summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-05-10 19:58:04 +0000
committerJim Meyering <jim@meyering.net>2003-05-10 19:58:04 +0000
commit888d3d38d964915bbe9354c2fdafb812f94bde11 (patch)
tree01e0c1da041ca11c2c0b7272db39f2296df0835a /src
parenta6a4c372c0f3b6403f787bea5558c3a1e64b1b40 (diff)
downloadcoreutils-888d3d38d964915bbe9354c2fdafb812f94bde11.tar.xz
Handle argc < optind.
Diffstat (limited to 'src')
-rw-r--r--src/expand.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/expand.c b/src/expand.c
index eff48e826..bd558fff9 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -397,10 +397,7 @@ main (int argc, char **argv)
else
tab_size = 0;
- if (optind == argc)
- file_list = stdin_argv;
- else
- file_list = &argv[optind];
+ file_list = (optind < argc ? &argv[optind] : stdin_argv);
expand ();