summaryrefslogtreecommitdiff
path: root/usr.sbin/quotaon
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-09 23:00:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-09 23:00:16 +0000
commit923e0b4768e0445e7d3273702a2440a31a01c237 (patch)
tree5c488f573adda708e5fce12132e88fc64979666b /usr.sbin/quotaon
parentbbf09057d1d30d8cd2cce9517c417ef641d91e55 (diff)
clean up flags++ instances around getopt()
ok florian
Diffstat (limited to 'usr.sbin/quotaon')
-rw-r--r--usr.sbin/quotaon/quotaon.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c
index d2e3acfba32..5d782bdd49e 100644
--- a/usr.sbin/quotaon/quotaon.c
+++ b/usr.sbin/quotaon/quotaon.c
@@ -72,7 +72,7 @@ main(int argc, char *argv[])
if (whoami == (char *)1)
whoami = *argv;
if (strcmp(whoami, "quotaoff") == 0)
- offmode++;
+ offmode = 1;
else if (strcmp(whoami, "quotaon") != 0) {
fprintf(stderr, "Name must be quotaon or quotaoff not %s\n",
whoami);
@@ -81,16 +81,16 @@ main(int argc, char *argv[])
while ((ch = getopt(argc, argv, "avug")) != -1) {
switch (ch) {
case 'a':
- aflag++;
+ aflag = 1;
break;
case 'g':
- gflag++;
+ gflag = 1;
break;
case 'u':
- uflag++;
+ uflag = 1;
break;
case 'v':
- vflag++;
+ vflag = 1;
break;
default:
usage(whoami);
@@ -101,8 +101,8 @@ main(int argc, char *argv[])
if (argc <= 0 && !aflag)
usage(whoami);
if (!gflag && !uflag) {
- gflag++;
- uflag++;
+ gflag = 1;
+ uflag = 1;
}
setfsent();
while ((fs = getfsent()) != NULL) {