Hello tech@,

I saw @tedu's post here about the grep flags (http://marc.info/?l=openbsd-tech&m=142084440918276&w=2) and realised I saw something similar just last night in snmpd. And since the verbose level is overwritten in log_verbose() anyway remove that line as well.

Index: snmpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/snmpd.c,v
retrieving revision 1.24
diff -u -p -u -r1.24 snmpd.c
--- snmpd.c     18 Aug 2014 13:13:42 -0000      1.24
+++ snmpd.c     10 Jan 2015 07:36:53 -0000
@@ -145,7 +145,7 @@ main(int argc, char *argv[])
        while ((c = getopt(argc, argv, "dD:nNf:v")) != -1) {
                switch (c) {
                case 'd':
-                       debug++;
+                       debug = 1;
                        break;
                case 'D':
                        if (cmdline_symset(optarg) < 0)
@@ -153,7 +153,7 @@ main(int argc, char *argv[])
                                    optarg);
                        break;
                case 'n':
-                       noaction++;
+                       noaction = 1;
                        break;
                case 'N':
                        flags |= SNMPD_F_NONAMES;
Index: log.c
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/log.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 log.c
--- log.c       25 Oct 2014 03:23:49 -0000      1.5
+++ log.c       10 Jan 2015 07:36:53 -0000
@@ -53,7 +53,6 @@ log_init(int n_debug)
        extern char     *__progname;

        debug = n_debug;
-       verbose = n_debug;

        if (!debug)
                openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);

Sincerely,

Martijn van Duren

Reply via email to