mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Use sizeof(buf) rather than hard-coding value
This commit is contained in:
2
log.c
2
log.c
@@ -85,7 +85,7 @@ _stderr_log_with_level(const char *level_name, int level, const char *fmt, va_li
|
||||
|
||||
time(&t);
|
||||
tm = localtime(&t);
|
||||
strftime(buf, 100, "[%Y-%m-%d %H:%M:%S]", tm);
|
||||
strftime(buf, sizeof(buf), "[%Y-%m-%d %H:%M:%S]", tm);
|
||||
fprintf(stderr, "%s [%s] ", buf, level_name);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user