mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
socket: fix severity check in debug logging
Don't waste time formatting the debug message in log_message() when
debug output is disabled.
Fixes: 86a3ef9ed1 ("socket: add new socket support")
This commit is contained in:
2
socket.c
2
socket.c
@@ -613,7 +613,7 @@ log_message(int sock_fd, int direction, SCK_Message *message, const char *prefix
|
|||||||
const char *local_addr, *remote_addr;
|
const char *local_addr, *remote_addr;
|
||||||
char if_index[20], tss[10], tsif[20], tslen[20];
|
char if_index[20], tss[10], tsif[20], tslen[20];
|
||||||
|
|
||||||
if (DEBUG <= 0 || log_min_severity < LOGS_DEBUG)
|
if (DEBUG <= 0 || log_min_severity > LOGS_DEBUG)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
remote_addr = NULL;
|
remote_addr = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user