From: Jim Meyering Date: Sat, 10 May 2003 19:58:04 +0000 (+0000) Subject: Handle argc < optind. X-Git-Tag: v5.0.1~534 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=888d3d38d964915bbe9354c2fdafb812f94bde11;p=thirdparty%2Fcoreutils.git Handle argc < optind. --- diff --git a/src/expand.c b/src/expand.c index eff48e8260..bd558fff97 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 ();