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): clean up CompatDeleteTarget and Compat...



details:   https://anonhg.NetBSD.org/src/rev/329bd02658dc
branches:  trunk
changeset: 956624:329bd02658dc
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Nov 02 20:50:24 2020 +0000

description:
make(1): clean up CompatDeleteTarget and CompatInterrupt

diffstat:

 usr.bin/make/compat.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (46 lines):

diff -r 49a8ac97ff3a -r 329bd02658dc usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Mon Nov 02 20:48:36 2020 +0000
+++ b/usr.bin/make/compat.c     Mon Nov 02 20:50:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.173 2020/11/01 17:47:26 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.174 2020/11/02 20:50:24 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,15 +96,15 @@
 #include "pathnames.h"
 
 /*     "@(#)compat.c   8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.173 2020/11/01 17:47:26 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.174 2020/11/02 20:50:24 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
 static int compatSigno;
 
 /*
- * CompatDeleteTarget -- delete a failed, interrupted, or otherwise
- * duffed target if not inhibited by .PRECIOUS.
+ * CompatDeleteTarget -- delete the file of a failed, interrupted, or
+ * otherwise duffed target if not inhibited by .PRECIOUS.
  */
 static void
 CompatDeleteTarget(GNode *gn)
@@ -129,8 +129,6 @@
 static void
 CompatInterrupt(int signo)
 {
-    GNode   *gn;
-
     CompatDeleteTarget(curTarg);
 
     if (curTarg != NULL && !Targ_Precious(curTarg)) {
@@ -138,7 +136,7 @@
         * Run .INTERRUPT only if hit with interrupt signal
         */
        if (signo == SIGINT) {
-           gn = Targ_FindNode(".INTERRUPT");
+           GNode *gn = Targ_FindNode(".INTERRUPT");
            if (gn != NULL) {
                Compat_Make(gn, gn);
            }



Home | Main Index | Thread Index | Old Index