Module Name:    src
Committed By:   riastradh
Date:           Sun Aug  2 01:36:46 UTC 2020

Modified Files:
        src/share/misc: style

Log Message:
Remove confusing advice about macros that might expand to nothing.

Such macros should not exist; as advised earlier in the file, they
should expand to `__nothing' (literally) from <sys/cdefs.h> which
itself expands to ((void)0) precisely so that the problem this advice
sought to avoid does not arise.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/share/misc/style

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

Modified files:

Index: src/share/misc/style
diff -u src/share/misc/style:1.58 src/share/misc/style:1.59
--- src/share/misc/style:1.58	Sun Aug  2 01:35:07 2020
+++ src/share/misc/style	Sun Aug  2 01:36:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: style,v 1.58 2020/08/02 01:35:07 riastradh Exp $ */
+/* $NetBSD: style,v 1.59 2020/08/02 01:36:46 riastradh Exp $ */
 
 /*
  * The revision control tag appears first, with a blank line after it.
@@ -30,7 +30,7 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: style,v 1.58 2020/08/02 01:35:07 riastradh Exp $");
+__RCSID("$NetBSD: style,v 1.59 2020/08/02 01:36:46 riastradh Exp $");
 
 /*
  * VERY important single-line comments look like this.
@@ -267,19 +267,6 @@ main(int argc, char *argv[])
 		stmt;
 
 	/*
-	 * Braces are required for control statements with a single statement
-	 * that may expand to nothing.
-	 */
-#ifdef DEBUG_FOO
-#define DPRINTF(a) printf a
-#else
-#define DPRINTF(a)
-#endif
-	if (broken) {
-		DPRINTF(("broken is %d\n", broken));
-	}
-
-	/*
 	 * Parts of a for loop may be left empty.  Don't put declarations
 	 * inside blocks unless the routine is unusually complicated.
 	 */

Reply via email to