mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-06 12:20:07 +00:00
CLEANUP: peers: fix format string for status messages (int signedness)
In issue #1939, Ilya mentions that cppchecks warned about use of "%d" to report the status state that's locally stored as an unsigned int. While technically valid, this will never cause any trouble since in the end what we store there are the applet's states (just a few enum values). Better use %u anyway to silence this warning.
This commit is contained in:
parent
a7dc251e07
commit
d05aa38950
@ -616,7 +616,7 @@ static int peer_prepare_status_errormsg(char *msg, size_t size, struct peer_prep
|
||||
unsigned int st1;
|
||||
|
||||
st1 = p->error_status.st1;
|
||||
ret = snprintf(msg, size, "%d\n", st1);
|
||||
ret = snprintf(msg, size, "%u\n", st1);
|
||||
if (ret >= size)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user