diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-08 05:10:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-08 05:10:11 +0000 |
commit | f07813fb45bc93c7a494a5d52dc2ec6f29a9d19f (patch) | |
tree | df6aaa2ab590d5ecaba4880da160a94ea570e402 /usr.sbin | |
parent | d07314cff552ae55c6fb1ee64350c7dc5e2ddcfe (diff) |
Avoid setting optind to 0; drahn@ OK
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/extattrctl/extattrctl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/extattrctl/extattrctl.c b/usr.sbin/extattrctl/extattrctl.c index 970218ca7fb..566010b3178 100644 --- a/usr.sbin/extattrctl/extattrctl.c +++ b/usr.sbin/extattrctl/extattrctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: extattrctl.c,v 1.2 2002/02/22 21:54:24 drahn Exp $ */ +/* $OpenBSD: extattrctl.c,v 1.3 2002/12/08 05:10:10 millert Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson * All rights reserved. @@ -86,7 +86,6 @@ initattr(int argc, char *argv[]) long loop, num_inodes; int ch, i, error, chunksize, overwrite = 0, flags; - optind = 0; while ((ch = getopt(argc, argv, "fp:r:w:")) != -1) switch (ch) { case 'f': @@ -215,8 +214,8 @@ main(int argc, char **argv) } return (0); } else if (!strcmp(argv[1], "initattr")) { - argc -= 2; - argv += 2; + argc--; + argv++; error = initattr(argc, argv); if (error) return (1); |