Fixes linux/osx build warnings
Clarify logic for configuration file
This commit is contained in:
+3
-3
@@ -523,8 +523,7 @@ setting_bool_t _get_bool_config(const char *sz_setting) {
|
|||||||
if (*sz_line == '\r') continue;
|
if (*sz_line == '\r') continue;
|
||||||
if (*sz_line == '\n') continue;
|
if (*sz_line == '\n') continue;
|
||||||
|
|
||||||
if (sscanf(sz_line, "%255[^=]=%255s", sz_name, sz_value) == 2);
|
if (sscanf(sz_line, "%255[^=]=%255s", sz_name, sz_value) == 2) {
|
||||||
|
|
||||||
/* strip leading/trailing whitespace */
|
/* strip leading/trailing whitespace */
|
||||||
psz_name = _strip_ws(sz_name);
|
psz_name = _strip_ws(sz_name);
|
||||||
|
|
||||||
@@ -537,6 +536,7 @@ setting_bool_t _get_bool_config(const char *sz_setting) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fclose(pf);
|
fclose(pf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,7 +680,7 @@ void yc_log_event(uint32_t id, yc_log_level_t level, const char * sz_format, ...
|
|||||||
}
|
}
|
||||||
|
|
||||||
openlog(szLOG_SOURCE, LOG_PID | LOG_NDELAY, LOG_USER);
|
openlog(szLOG_SOURCE, LOG_PID | LOG_NDELAY, LOG_USER);
|
||||||
syslog(priority, rgsz_message);
|
syslog(priority, "%s", rgsz_message);
|
||||||
closelog();
|
closelog();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user