summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-05-10 20:27:56 +0000
committerJim Meyering <jim@meyering.net>2003-05-10 20:27:56 +0000
commit6a0019aa786634a9cfb8a5a84c3d155cddef8102 (patch)
treed0c8743bf0e29cf8aceac09346160390dc26ddfa
parent4fd6d22880267a644085097791a78b7bfcc42e1b (diff)
downloadcoreutils-6a0019aa786634a9cfb8a5a84c3d155cddef8102.tar.xz
(main): Handle argc < optind.
-rw-r--r--src/unexpand.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/unexpand.c b/src/unexpand.c
index 634f7c9c0..b91abd87b 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -482,10 +482,7 @@ main (int argc, char **argv)
tab_size = 0;
}
- if (optind == argc)
- file_list = stdin_argv;
- else
- file_list = &argv[optind];
+ file_list = (optind < argc ? &argv[optind] : stdin_argv);
unexpand ();