Module Name:    src
Committed By:   christos
Date:           Sat Oct 24 15:46:09 UTC 2015

Modified Files:
        src/share/misc: style

Log Message:
Amend variable initialization in the declarations comment.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 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.51 src/share/misc/style:1.52
--- src/share/misc/style:1.51	Fri Mar  8 11:50:02 2013
+++ src/share/misc/style	Sat Oct 24 11:46:09 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: style,v 1.51 2013/03/08 16:50:02 christos Exp $ */
+/* $NetBSD: style,v 1.52 2015/10/24 15:46:09 christos 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.51 2013/03/08 16:50:02 christos Exp $");
+__RCSID("$NetBSD: style,v 1.52 2015/10/24 15:46:09 christos Exp $");
 
 /*
  * VERY important single-line comments look like this.
@@ -339,7 +339,10 @@ function(int a1, int a2, float fl, int a
 	 * Function prototypes should go in the include file "extern.h".
 	 * If a line overflows reuse the type keyword.
 	 *
-	 * DO NOT initialize variables in the declarations.
+	 * Avoid initializing variables in the declarations; move
+	 * declarations next to their first use, and initialize
+	 * opportunistically. This avoids over-initialization and
+	 * accidental bugs caused by declaration reordering.
 	 */
 	extern u_char one;
 	extern char two;

Reply via email to