From c45e3fa9793a273a0eab40d1626bcda7d710552c Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 7 Aug 2014 03:39:13 +0200 Subject: Corrected several format-string errors through the code - Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru --- src/map/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/log.c') diff --git a/src/map/log.c b/src/map/log.c index 523ef1d65..b5179e16b 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -401,11 +401,11 @@ int log_config_read(const char* cfgName) { return 1; } - while( fgets(line, sizeof(line), fp) ) { - if( line[0] == '/' && line[1] == '/' ) + while (fgets(line, sizeof(line), fp)) { + if (line[0] == '/' && line[1] == '/') continue; - if( sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2 ) { + if (sscanf(line, "%1023[^:]: %1023[^\r\n]", w1, w2) == 2) { if( strcmpi(w1, "enable_logs") == 0 ) logs->config.enable_logs = (e_log_pick_type)config_switch(w2); else if( strcmpi(w1, "sql_logs") == 0 ) -- cgit v1.2.3-60-g2f50