diff options
Diffstat (limited to 'usr.sbin/edquota/edquota.c')
-rw-r--r-- | usr.sbin/edquota/edquota.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index e7be4b7..0e1a988 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -147,8 +147,8 @@ main(int argc, char **argv) qup->dqblk.dqb_btime = 0; qup->dqblk.dqb_itime = 0; } - while (argc-- > 0) { - if (isdigit(*argv[0]) && + for (; argc-- > 0; argv++) { + if (strspn(*argv, "0123456789-") == strlen(*argv) && (cp = strchr(*argv, '-')) != NULL) { *cp++ = '\0'; startuid = atoi(*argv); @@ -166,7 +166,7 @@ main(int argc, char **argv) } continue; } - if ((id = getentry(*argv++, quotatype)) < 0) + if ((id = getentry(*argv, quotatype)) < 0) continue; putprivs(id, quotatype, protoprivs); } |