Fixed compiler warnings about snprintf truncations
This commit is contained in:
parent
8822771169
commit
61b9a42fc5
@ -555,9 +555,7 @@ log_message(const enum logLevels lvl, const char *msg, ...)
|
||||
now_t = time(&now_t);
|
||||
now = localtime(&now_t);
|
||||
|
||||
snprintf(buff, 21, "[%.4d%.2d%.2d-%.2d:%.2d:%.2d] ", now->tm_year + 1900,
|
||||
now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min,
|
||||
now->tm_sec);
|
||||
strftime(buff, 21, "[%Y%m%d-%H:%M:%S] ", now);
|
||||
|
||||
internal_log_lvl2str(lvl, buff + 20);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user