From d8aa702d354730a7e287573336dc59593df28f9d Mon Sep 17 00:00:00 2001 From: uebayasi Date: Mon, 15 Dec 2014 15:49:25 +0000 Subject: [PATCH] Revert debug code. Simplify. --- usr.bin/config/mkmakefile.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/usr.bin/config/mkmakefile.c b/usr.bin/config/mkmakefile.c index de655b1fea4c..8202f73ebea1 100644 --- a/usr.bin/config/mkmakefile.c +++ b/usr.bin/config/mkmakefile.c @@ -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 -__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 #include @@ -106,19 +106,16 @@ mkmakefile(void) */ (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); /*