BUG/MINOR: cli: "show cli sockets" would always report process 64

Another small bug in "show cli sockets" made the last fix always report
process 64 due to a signedness issue in the shift operation when building
the mask.
This commit is contained in:
Willy Tarreau 2016-12-16 12:56:31 +01:00
parent 20c5e52ac7
commit 4305ac7f1d

View File

@ -798,9 +798,8 @@ static int cli_io_handler_show_cli_sock(struct appctx *appctx)
if (bind_conf->bind_proc != 0) {
int pos;
for (pos = 0; pos < 8 * sizeof(bind_conf->bind_proc); pos++) {
if (bind_conf->bind_proc & (1 << pos)) {
if (bind_conf->bind_proc & (1UL << pos)) {
chunk_appendf(&trash, "%d,", pos+1);
}
}