Module Name:    src
Committed By:   kre
Date:           Sun Jul 22 20:37:52 UTC 2018

Modified Files:
        src/bin/sh: error.h

Log Message:
NFC: better protect the INTON (etc) macros ( do { } while(0) )
This is just a kind of precaution, none of the uses actually
require the extra protection.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/sh/error.h

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/error.h
diff -u src/bin/sh/error.h:1.19 src/bin/sh/error.h:1.20
--- src/bin/sh/error.h:1.19	Thu Mar 15 02:02:20 2012
+++ src/bin/sh/error.h	Sun Jul 22 20:37:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: error.h,v 1.19 2012/03/15 02:02:20 joerg Exp $	*/
+/*	$NetBSD: error.h,v 1.20 2018/07/22 20:37:52 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -83,9 +83,9 @@ extern volatile int suppressint;
 extern volatile int intpending;
 
 #define INTOFF suppressint++
-#define INTON { if (--suppressint == 0 && intpending) onint(); }
-#define FORCEINTON {suppressint = 0; if (intpending) onint();}
-#define CLEAR_PENDING_INT intpending = 0
+#define INTON do { if (--suppressint == 0 && intpending) onint(); } while (0)
+#define FORCEINTON do { suppressint = 0; if (intpending) onint(); } while (0)
+#define CLEAR_PENDING_INT (intpending = 0)
 #define int_pending() intpending
 
 #if ! defined(SHELL_BUILTIN)

Reply via email to