From: Willy Tarreau Date: Fri, 16 Dec 2016 11:56:31 +0000 (+0100) Subject: BUG/MINOR: cli: "show cli sockets" would always report process 64 X-Git-Tag: v1.8-dev1~272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4305ac7f1d49ed998a4f227e8cecd867c547da48;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/cli.c b/src/cli.c index 6fd7455c9c..a875d38448 100644 --- a/src/cli.c +++ b/src/cli.c @@ -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); } }