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:
Willy Tarreau 2022-11-24 15:32:20 +01:00
parent a7dc251e07
commit d05aa38950

View File

@ -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;