Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/misc Move a style recommendation closer to the syntax ...



details:   https://anonhg.NetBSD.org/src/rev/eaa5e20a62ae
branches:  trunk
changeset: 372854:eaa5e20a62ae
user:      jkoshy <jkoshy%NetBSD.org@localhost>
date:      Fri Dec 30 21:12:44 2022 +0000

description:
Move a style recommendation closer to the syntax that it describes.

diffstat:

 share/misc/style |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 0ce20a63808a -r eaa5e20a62ae share/misc/style
--- a/share/misc/style  Fri Dec 30 20:37:01 2022 +0000
+++ b/share/misc/style  Fri Dec 30 21:12:44 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: style,v 1.66 2022/12/30 17:02:31 jkoshy Exp $ */
+/* $NetBSD: style,v 1.67 2022/12/30 21:12:44 jkoshy 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.66 2022/12/30 17:02:31 jkoshy Exp $");
+__RCSID("$NetBSD: style,v 1.67 2022/12/30 21:12:44 jkoshy Exp $");
 
 /*
  * VERY important single-line comments look like this.
@@ -260,11 +260,13 @@
         * Braces around single-line bodies are optional; use discretion.
         *
         * Use narrow scopes for loop variables where possible.
-        *
-        * Forever loops are done with for's, not while's.
         */
        for (char *p = buf; *p != '\0'; ++p)
                continue;               /* Explicit no-op */
+
+       /*
+        * Forever loops are done with for's, not while's.
+        */
        for (;;)
                stmt;
 



Home | Main Index | Thread Index | Old Index