aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-01-04 17:16:19 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-09 19:05:25 (GMT)
commit16e2f50d53924f809a3a56c8d1b549dca46be652 (patch)
treecd3407c4e3341211531425964d746801ecf02a7b
parentd9400277a2612b8a016d23e6927560842d1e1615 (diff)
downloadhostap-06-16e2f50d53924f809a3a56c8d1b549dca46be652.zip
hostap-06-16e2f50d53924f809a3a56c8d1b549dca46be652.tar.gz
hostap-06-16e2f50d53924f809a3a56c8d1b549dca46be652.tar.bz2
Mark fmt parameter const for wpa_printf/msg
(cherry picked from commit 0de4da91c1cc8bcdfd5b29aa7b33887a1f8e3775)
-rw-r--r--src/utils/wpa_debug.c6
-rw-r--r--src/utils/wpa_debug.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/src/utils/wpa_debug.c b/src/utils/wpa_debug.c
index 25b9162..4dd0732 100644
--- a/src/utils/wpa_debug.c
+++ b/src/utils/wpa_debug.c
@@ -56,7 +56,7 @@ void wpa_debug_print_timestamp(void)
*
* Note: New line '\n' is added to the end of the text when printing to stdout.
*/
-void wpa_printf(int level, char *fmt, ...)
+void wpa_printf(int level, const char *fmt, ...)
{
va_list ap;
@@ -267,7 +267,7 @@ void wpa_msg_register_cb(wpa_msg_cb_func func)
}
-void wpa_msg(void *ctx, int level, char *fmt, ...)
+void wpa_msg(void *ctx, int level, const char *fmt, ...)
{
va_list ap;
char *buf;
@@ -290,7 +290,7 @@ void wpa_msg(void *ctx, int level, char *fmt, ...)
}
-void wpa_msg_ctrl(void *ctx, int level, char *fmt, ...)
+void wpa_msg_ctrl(void *ctx, int level, const char *fmt, ...)
{
va_list ap;
char *buf;
diff --git a/src/utils/wpa_debug.h b/src/utils/wpa_debug.h
index 01cf474..b4010d5 100644
--- a/src/utils/wpa_debug.h
+++ b/src/utils/wpa_debug.h
@@ -60,7 +60,7 @@ void wpa_debug_print_timestamp(void);
*
* Note: New line '\n' is added to the end of the text when printing to stdout.
*/
-void wpa_printf(int level, char *fmt, ...)
+void wpa_printf(int level, const char *fmt, ...)
PRINTF_FORMAT(2, 3);
/**
@@ -158,7 +158,7 @@ void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
*
* Note: New line '\n' is added to the end of the text when printing to stdout.
*/
-void wpa_msg(void *ctx, int level, char *fmt, ...) PRINTF_FORMAT(3, 4);
+void wpa_msg(void *ctx, int level, const char *fmt, ...) PRINTF_FORMAT(3, 4);
/**
* wpa_msg_ctrl - Conditional printf for ctrl_iface monitors
@@ -172,7 +172,8 @@ void wpa_msg(void *ctx, int level, char *fmt, ...) PRINTF_FORMAT(3, 4);
* attached ctrl_iface monitors. In other words, it can be used for frequent
* events that do not need to be sent to syslog.
*/
-void wpa_msg_ctrl(void *ctx, int level, char *fmt, ...) PRINTF_FORMAT(3, 4);
+void wpa_msg_ctrl(void *ctx, int level, const char *fmt, ...)
+PRINTF_FORMAT(3, 4);
typedef void (*wpa_msg_cb_func)(void *ctx, int level, const char *txt,
size_t len);