From 07f677df38e1aedfa2e7f24f7e63db757d3cb782 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 28 Mar 2026 16:22:25 +0000 Subject: C operator precedence is hard --- src/daemontools-extras/s6-setsid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemontools-extras/s6-setsid.c b/src/daemontools-extras/s6-setsid.c index 7a5888c..3c12b95 100644 --- a/src/daemontools-extras/s6-setsid.c +++ b/src/daemontools-extras/s6-setsid.c @@ -60,7 +60,7 @@ int main (int argc, char const *const *argv) { if (!uint0_scan(wgola[GOLA_CTTY], &ctty)) dieusage() ; } - else if (wgolb & (GOLB_PGRP | GOLB_FG) == GOLB_PGRP | GOLB_FG) + else if ((wgolb & (GOLB_PGRP | GOLB_FG)) == (GOLB_PGRP | GOLB_FG)) { int fd = openc_read("/dev/tty") ; if (fd == -1) strerr_diefu2sys(111, "open ", "/dev/tty") ; -- cgit v1.3.1