summaryrefslogtreecommitdiff
path: root/src/map/log.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-08-07 03:39:13 +0200
committerHaru <haru@dotalux.com>2014-08-07 05:37:38 +0200
commitc45e3fa9793a273a0eab40d1626bcda7d710552c (patch)
tree4f6c9d47770a15c8cbfe065f7ee9203f77e57022 /src/map/log.c
parentcaf89724767465ecf339c391bb6d7a937d563fb2 (diff)
downloadhercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.gz
hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.bz2
hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.xz
hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.zip
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 <haru@dotalux.com>
Diffstat (limited to 'src/map/log.c')
-rw-r--r--src/map/log.c6
1 files changed, 3 insertions, 3 deletions
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 )