aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-03-28 16:22:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-03-28 16:22:25 +0000
commit07f677df38e1aedfa2e7f24f7e63db757d3cb782 (patch)
tree107f6f4f34c8272a8cd0789cffd44de29701d32f
parenteaa90b34e3641f6a30a3c951f6c67215383f3c0c (diff)
downloads6-07f677df38e1aedfa2e7f24f7e63db757d3cb782.tar.gz
C operator precedence is hard
-rw-r--r--src/daemontools-extras/s6-setsid.c2
1 files changed, 1 insertions, 1 deletions
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") ;