]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
xap_helper: fix fcntl() argument order
authorEric Wong <e@80x24.org>
Thu, 7 Sep 2023 00:54:09 +0000 (00:54 +0000)
committerEric Wong <e@80x24.org>
Thu, 7 Sep 2023 05:42:39 +0000 (05:42 +0000)
*sigh*  I only noticed this when running `make check-run' under
OpenBSD.

lib/PublicInbox/xap_helper.h

index 73590efd803551906973aaf8cefda58beaa1c1ee..70760367685f4ae0482ce3c81c6f65eaae439d16 100644 (file)
@@ -1168,9 +1168,9 @@ int main(int argc, char *argv[])
        if (!worker_pids) err(EXIT_FAILURE, "calloc");
 
        if (pipe(pipefds)) err(EXIT_FAILURE, "pipe");
-       int fl = fcntl(F_GETFL, pipefds[1]);
+       int fl = fcntl(pipefds[1], F_GETFL);
        if (fl == -1) err(EXIT_FAILURE, "F_GETFL");
-       if (fcntl(F_SETFL, pipefds[1], fl | O_NONBLOCK))
+       if (fcntl(pipefds[1], F_SETFL, fl | O_NONBLOCK))
                err(EXIT_FAILURE, "F_SETFL");
 
        CHECK(int, 0, sigdelset(&pset, SIGCHLD));