Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/config - Don't bother emitting "#define NFOO 0" for...



details:   https://anonhg.NetBSD.org/src/rev/daf048f9d5e0
branches:  trunk
changeset: 518302:daf048f9d5e0
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Nov 28 02:47:42 2001 +0000

description:
- Don't bother emitting "#define NFOO 0" for defflag foo (whether or
  not foo was provided); it's unnecessary #define namespace pollution
- Remove a couple of unused vars

diffstat:

 usr.sbin/config/mkheaders.c |  9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diffs (37 lines):

diff -r 8fbc31c82501 -r daf048f9d5e0 usr.sbin/config/mkheaders.c
--- a/usr.sbin/config/mkheaders.c       Wed Nov 28 01:31:59 2001 +0000
+++ b/usr.sbin/config/mkheaders.c       Wed Nov 28 02:47:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkheaders.c,v 1.26 2001/02/21 00:03:43 cgd Exp $       */
+/*     $NetBSD: mkheaders.c,v 1.27 2001/11/28 02:47:42 lukem Exp $     */
 
 /*
  * Copyright (c) 1992, 1993
@@ -160,8 +160,6 @@
        char tfname[BUFSIZ];
        struct nvlist *nv, *option;
        int isfsoption;
-       int isparam;
-       int isflag;
        FILE *fp;
 
        (void)sprintf(tfname, "tmp_%s", name);
@@ -170,8 +168,6 @@
 
        for (nv = value; nv != NULL; nv = nv->nv_next) {
                isfsoption = OPT_FSOPT(nv->nv_name);
-               isparam  = OPT_DEFPARAM(nv->nv_name);
-               isflag  = OPT_DEFFLAG(nv->nv_name);
 
                if ((option = ht_lookup(opttab, nv->nv_name)) == NULL &&
                    (option = ht_lookup(fsopttab, nv->nv_name)) == NULL) {
@@ -188,9 +184,6 @@
                        if (fputc('\n', fp) < 0)
                                goto bad;
                }
-               if (isflag)
-                       fprintcnt(fp, nv);
-
        }
 
        if (fclose(fp) == EOF)



Home | Main Index | Thread Index | Old Index