aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-07-26 16:10:39 +0000
committerRob Landley <rob@landley.net>2006-07-26 16:10:39 +0000
commit7cc6b69bb09d2242493b7c4d882af958254e0cc7 (patch)
tree1333b74e2fc60fbd5f7eb1a7796beb1fc3ac4397
parente1a0f5372f6632051fb881fa3faded0d8396388f (diff)
downloadbusybox-7cc6b69bb09d2242493b7c4d882af958254e0cc7.tar.gz
Patch from Shaun Jackman, set optind by hand if we don't call getopt.
-rw-r--r--coreutils/md5_sha1_sum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index eeee18449..aea43ff8c 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -98,6 +98,7 @@ static int hash_files(int argc, char **argv, hash_algo_t hash_algo)
if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK)
flags = bb_getopt_ulflags(argc, argv, "scw");
+ else optind = 1;
if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK && !(flags & FLAG_CHECK)) {
if (flags & FLAG_SILENT) {