Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): use common indentation style for else



details:   https://anonhg.NetBSD.org/src/rev/c2d24ed1bfaa
branches:  trunk
changeset: 1016081:c2d24ed1bfaa
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 08 08:53:22 2020 +0000

description:
make(1): use common indentation style for else

diffstat:

 usr.bin/make/main.c |  10 ++++------
 usr.bin/make/make.c |   7 +++----
 usr.bin/make/util.c |  10 ++++------
 3 files changed, 11 insertions(+), 16 deletions(-)

diffs (99 lines):

diff -r c37b4aea5ca9 -r c2d24ed1bfaa usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sun Nov 08 08:33:07 2020 +0000
+++ b/usr.bin/make/main.c       Sun Nov 08 08:53:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.443 2020/11/08 02:56:43 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.444 2020/11/08 08:53:22 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "trace.h"
 
 /*     "@(#)main.c     8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.443 2020/11/08 02:56:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.444 2020/11/08 08:53:22 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
            "The Regents of the University of California.  "
@@ -258,12 +258,10 @@
                        if (modules[1] == '1') {
                                opts.debug |= DEBUG_GRAPH1;
                                ++modules;
-                       }
-                       else if (modules[1] == '2') {
+                       } else if (modules[1] == '2') {
                                opts.debug |= DEBUG_GRAPH2;
                                ++modules;
-                       }
-                       else if (modules[1] == '3') {
+                       } else if (modules[1] == '3') {
                                opts.debug |= DEBUG_GRAPH3;
                                ++modules;
                        }
diff -r c37b4aea5ca9 -r c2d24ed1bfaa usr.bin/make/make.c
--- a/usr.bin/make/make.c       Sun Nov 08 08:33:07 2020 +0000
+++ b/usr.bin/make/make.c       Sun Nov 08 08:53:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.190 2020/11/08 08:33:07 rillig Exp $        */
+/*     $NetBSD: make.c,v 1.191 2020/11/08 08:53:22 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -108,7 +108,7 @@
 #include "job.h"
 
 /*     "@(#)make.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: make.c,v 1.190 2020/11/08 08:33:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.191 2020/11/08 08:53:22 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked = 1;
@@ -550,8 +550,7 @@
        DEBUG2(MAKE, " recheck(%s): update time from %s to now\n",
               gn->name, Targ_FmtTime(gn->mtime));
        gn->mtime = now;
-    }
-    else {
+    } else {
        DEBUG2(MAKE, " recheck(%s): current update time: %s\n",
               gn->name, Targ_FmtTime(gn->mtime));
     }
diff -r c37b4aea5ca9 -r c2d24ed1bfaa usr.bin/make/util.c
--- a/usr.bin/make/util.c       Sun Nov 08 08:33:07 2020 +0000
+++ b/usr.bin/make/util.c       Sun Nov 08 08:53:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.66 2020/11/07 22:29:58 rillig Exp $ */
+/*     $NetBSD: util.c,v 1.67 2020/11/08 08:53:22 rillig Exp $ */
 
 /*
  * Missing stuff from OS's
@@ -15,7 +15,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: util.c,v 1.66 2020/11/07 22:29:58 rillig Exp $");
+MAKE_RCSID("$NetBSD: util.c,v 1.67 2020/11/08 08:53:22 rillig Exp $");
 
 #if !defined(MAKE_NATIVE) && !defined(HAVE_STRERROR)
 extern int errno, sys_nerr;
@@ -28,8 +28,7 @@
     if (e < 0 || e >= sys_nerr) {
        snprintf(buf, sizeof buf, "Unknown error %d", e);
        return buf;
-    }
-    else
+    } else
        return sys_errlist[e];
 }
 #endif
@@ -291,8 +290,7 @@
            for (d = readdir(dp); d != NULL; d = readdir(dp))
                if (d->d_fileno == st_cur.st_ino)
                    break;
-       }
-       else {
+       } else {
            /*
             * Parent has a different device. This is a mount point so we
             * need to stat every member



Home | Main Index | Thread Index | Old Index