Module Name:    src
Committed By:   rillig
Date:           Wed Oct 21 06:36:10 UTC 2020

Modified Files:
        src/usr.bin/make: suff.c

Log Message:
make(1): unindent SuffFindNormalDepsUnknown


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/usr.bin/make/suff.c

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

Modified files:

Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.203 src/usr.bin/make/suff.c:1.204
--- src/usr.bin/make/suff.c:1.203	Wed Oct 21 06:34:26 2020
+++ src/usr.bin/make/suff.c	Wed Oct 21 06:36:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.203 2020/10/21 06:34:26 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.204 2020/10/21 06:36:10 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -129,7 +129,7 @@
 #include "dir.h"
 
 /*	"@(#)suff.c	8.4 (Berkeley) 3/21/94"	*/
-MAKE_RCSID("$NetBSD: suff.c,v 1.203 2020/10/21 06:34:26 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.204 2020/10/21 06:36:10 rillig Exp $");
 
 #define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
 #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@@ -1633,38 +1633,38 @@ SuffFindNormalDepsUnknown(GNode *gn, con
 {
     Src *targ;
 
-    if (Lst_IsEmpty(targs) && suffNull != NULL) {
-	SUFF_DEBUG1("\tNo known suffix on %s. Using .NULL suffix\n",
-		    gn->name);
+    if (!Lst_IsEmpty(targs) || suffNull == NULL)
+        return;
 
-	targ = bmake_malloc(sizeof *targ);
-	targ->file = bmake_strdup(gn->name);
-	targ->suff = suffNull;
-	targ->suff->refCount++;
-	targ->node = gn;
-	targ->parent = NULL;
-	targ->children = 0;
-	targ->pref = bmake_strdup(sopref);
+    SUFF_DEBUG1("\tNo known suffix on %s. Using .NULL suffix\n", gn->name);
+
+    targ = bmake_malloc(sizeof *targ);
+    targ->file = bmake_strdup(gn->name);
+    targ->suff = suffNull;
+    targ->suff->refCount++;
+    targ->node = gn;
+    targ->parent = NULL;
+    targ->children = 0;
+    targ->pref = bmake_strdup(sopref);
 #ifdef DEBUG_SRC
-	targ->cp = Lst_New();
+    targ->cp = Lst_New();
 #endif
 
-	/*
-	 * Only use the default suffix rules if we don't have commands
-	 * defined for this gnode; traditional make programs used to
-	 * not define suffix rules if the gnode had children but we
-	 * don't do this anymore.
-	 */
-	if (Lst_IsEmpty(gn->commands))
-	    SuffAddLevel(srcs, targ);
-	else {
-	    SUFF_DEBUG0("not ");
-	}
+    /*
+     * Only use the default suffix rules if we don't have commands
+     * defined for this gnode; traditional make programs used to
+     * not define suffix rules if the gnode had children but we
+     * don't do this anymore.
+     */
+    if (Lst_IsEmpty(gn->commands))
+	SuffAddLevel(srcs, targ);
+    else {
+	SUFF_DEBUG0("not ");
+    }
 
-	SUFF_DEBUG0("adding suffix rules\n");
+    SUFF_DEBUG0("adding suffix rules\n");
 
-	Lst_Append(targs, targ);
-    }
+    Lst_Append(targs, targ);
 }
 
 /* Locate implicit dependencies for regular targets.

Reply via email to