From 7cc6b69bb09d2242493b7c4d882af958254e0cc7 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 26 Jul 2006 16:10:39 +0000 Subject: [PATCH] Patch from Shaun Jackman, set optind by hand if we don't call getopt. --- coreutils/md5_sha1_sum.c | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.25.1