mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Check that LOGGER macros are only called with string literals.
Avoid any dynamic format strings, even ones like `cond ? "str1" : "str2"`.
This commit is contained in:
parent
1b7bf5b182
commit
36cb30d47d
|
@ -871,8 +871,13 @@ Networking_Core *new_networking_ex(const Logger *log, IP ip, uint16_t port_from,
|
||||||
|
|
||||||
int neterror = net_error();
|
int neterror = net_error();
|
||||||
const char *strerror = net_new_strerror(neterror);
|
const char *strerror = net_new_strerror(neterror);
|
||||||
LOGGER_DEBUG(log, res < 0 ? "Failed to activate local multicast membership. (%d, %s)" :
|
|
||||||
"Local multicast group FF02::1 joined successfully. (%d, %s)", neterror, strerror);
|
if (res < 0) {
|
||||||
|
LOGGER_DEBUG(log, "Failed to activate local multicast membership. (%d, %s)", neterror, strerror);
|
||||||
|
} else {
|
||||||
|
LOGGER_DEBUG(log, "Local multicast group FF02::1 joined successfully. (%d, %s)", neterror, strerror);
|
||||||
|
}
|
||||||
|
|
||||||
net_kill_strerror(strerror);
|
net_kill_strerror(strerror);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user