Module Name:    src
Committed By:   kre
Date:           Fri Mar  1 06:15:02 UTC 2019

Modified Files:
        src/bin/sh: redir.c

Log Message:
The previous commit was obviously made by a broken mindless automoton
with an IQ that underflows when one attempts to enter it as an
unnormalised 160 bit long long double...

Whoever would believe that (~0 & anything) was a meaningful thing
to write?   And three times in one #define.   That could not possibly
have been me, could it?

Simplify, simplify, simplify.           NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/bin/sh/redir.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/redir.c
diff -u src/bin/sh/redir.c:1.65 src/bin/sh/redir.c:1.66
--- src/bin/sh/redir.c:1.65	Fri Mar  1 05:23:35 2019
+++ src/bin/sh/redir.c	Fri Mar  1 06:15:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: redir.c,v 1.65 2019/03/01 05:23:35 kre Exp $	*/
+/*	$NetBSD: redir.c,v 1.66 2019/03/01 06:15:01 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)redir.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: redir.c,v 1.65 2019/03/01 05:23:35 kre Exp $");
+__RCSID("$NetBSD: redir.c,v 1.66 2019/03/01 06:15:01 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -764,8 +764,7 @@ static const struct flgnames {
     O_ALT_IO|O_DIRECT|O_NOSIGPIPE)
 
 #ifndef	O_CLOEXEC
-# define O_CLOEXEC	((~0 & ~ALLFLAGS) ^	 \
-				((~0 & ~ALLFLAGS) & ((~0 & ~ALLFLAGS) - 1)))
+# define O_CLOEXEC	((~ALLFLAGS) ^ ((~ALLFLAGS) & ((~ALLFLAGS) - 1)))
 #endif
 
 	/* for any system we support, close on exec is always defined */

Reply via email to