argument pointer not being incremented through arguments
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 28 Apr 1995 04:49:16 +0000 (20:49 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 28 Apr 1995 04:49:16 +0000 (20:49 -0800)
From: "Chris G. Demetriou" <cgd@postgres.Berkeley.EDU>

SCCS-vsn: usr.sbin/sysctl/sysctl.c 8.3

usr/src/usr.sbin/sysctl/sysctl.c

index 779d251..ce0e14b 100644 (file)
@@ -12,7 +12,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)sysctl.c   8.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)sysctl.c   8.3 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -126,7 +126,7 @@ main(argc, argv)
        }
        if (argc == 0)
                usage();
        }
        if (argc == 0)
                usage();
-       while (argc-- > 0)
+       for (; *argv != NULL; ++argv)
                parse(*argv, 1);
        exit(0);
 }
                parse(*argv, 1);
        exit(0);
 }