From: Ian Darwin Date: Wed, 23 Mar 1988 11:42:16 +0000 (+0000) Subject: exit code non-zero for case of "no files and no -f". X-Git-Tag: FILE3_27~337 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bb7e855a4f2b4bfd5e3b39059e17b0e1751eed3;p=file exit code non-zero for case of "no files and no -f". --- diff --git a/src/file.c b/src/file.c index 929c19a9..2403867b 100644 --- a/src/file.c +++ b/src/file.c @@ -34,7 +34,7 @@ #ifndef lint static char *moduleid = - "@(#)$Header: /home/glen/git/file/cvs/file/src/file.c,v 1.14 1987/11/12 13:11:06 ian Exp $"; + "@(#)$Header: /home/glen/git/file/cvs/file/src/file.c,v 1.15 1988/03/23 11:42:16 ian Exp $"; #endif /* lint */ extern char *ckfmsg; int debug = 0, /* huh? */ @@ -97,8 +97,10 @@ char *argv[]; exit(ret); if (optind == argc) { - if (!didsomefiles) + if (!didsomefiles) { (void)fprintf(stderr, USAGE, progname); + exit(2); + } } else for (; optind < argc; optind++)