Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/config Revert debug code. Simplify.



details:   https://anonhg.NetBSD.org/src/rev/346353b5abc0
branches:  trunk
changeset: 334932:346353b5abc0
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Mon Dec 15 15:49:25 2014 +0000

description:
Revert debug code.  Simplify.

diffstat:

 usr.bin/config/mkmakefile.c |  21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diffs (45 lines):

diff -r a822c5b3c0c4 -r 346353b5abc0 usr.bin/config/mkmakefile.c
--- a/usr.bin/config/mkmakefile.c       Mon Dec 15 15:41:18 2014 +0000
+++ b/usr.bin/config/mkmakefile.c       Mon Dec 15 15:49:25 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkmakefile.c,v 1.36 2014/12/15 15:41:18 uebayasi Exp $ */
+/*     $NetBSD: mkmakefile.c,v 1.37 2014/12/15 15:49:25 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkmakefile.c,v 1.36 2014/12/15 15:41:18 uebayasi Exp $");
+__RCSID("$NetBSD: mkmakefile.c,v 1.37 2014/12/15 15:49:25 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <ctype.h>
@@ -106,19 +106,16 @@
         */
        (void)snprintf(buf, sizeof(buf), "conf/Makefile.kern.inc");
        ifname = sourcepath(buf);
-       if ((ifp = fopen(ifname, "r")) != NULL) {
-               while (fgets(line, sizeof(line), ifp) != NULL) {
-                       fputc('+', stderr);
-                       if (strncmp(line, "build_kernel:", 13) == 0) {
-                               has_build_kernel = 1;
-                               break;
-                       }
-               }
-       }
-       if (ifp == NULL) {
+       if ((ifp = fopen(ifname, "r")) == NULL) {
                warn("cannot read %s", ifname);
                goto bad2;
        }
+       while (fgets(line, sizeof(line), ifp) != NULL) {
+               if (strncmp(line, "build_kernel:", 13) == 0) {
+                       has_build_kernel = 1;
+                       break;
+               }
+       }
        (void)fclose(ifp);
 
        /*



Home | Main Index | Thread Index | Old Index