diff options
author | imp <imp@FreeBSD.org> | 1997-03-28 15:24:41 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-28 15:24:41 +0000 |
commit | 054f35c2222ef251bc2877814cf7bf5ff6038166 (patch) | |
tree | bf569c1217b3803ad2d64ba6083e1610213c7ece /bin/chmod/chmod.c | |
parent | 3ad19c4ae3d0f156867d86a310e2d6d0f40a7a51 (diff) | |
download | FreeBSD-src-054f35c2222ef251bc2877814cf7bf5ff6038166.zip FreeBSD-src-054f35c2222ef251bc2877814cf7bf5ff6038166.tar.gz |
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Diffstat (limited to 'bin/chmod/chmod.c')
-rw-r--r-- | bin/chmod/chmod.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 2004a51..6d61ca4 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: chmod.c,v 1.8 1997/02/22 14:01:30 peter Exp $ */ #ifndef lint @@ -73,7 +73,7 @@ main(argc, argv) set = NULL; omode = 0; Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0; - while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != EOF) + while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != -1) switch (ch) { case 'H': Hflag = 1; |