From 552d265b6ced1e56d31f20f16a7fe9ae818d568b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 15 Jan 1997 23:44:39 +0000 Subject: getopt(3) returns -1 when out of args, not EOF, whee! --- usr.bin/rsh/rsh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/rsh/rsh.c') diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index 517a400afa5..b708793dbe6 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsh.c,v 1.10 1996/12/22 03:26:02 tholo Exp $ */ +/* $OpenBSD: rsh.c,v 1.11 1997/01/15 23:43:09 millert Exp $ */ /*- * Copyright (c) 1983, 1990 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rsh.c 5.24 (Berkeley) 7/1/91";*/ -static char rcsid[] = "$OpenBSD: rsh.c,v 1.10 1996/12/22 03:26:02 tholo Exp $"; +static char rcsid[] = "$OpenBSD: rsh.c,v 1.11 1997/01/15 23:43:09 millert Exp $"; #endif /* not lint */ #include @@ -121,7 +121,7 @@ main(argc, argv) #else #define OPTIONS "8KLdel:nw" #endif - while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != EOF) + while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1) switch(ch) { case 'K': #ifdef KERBEROS -- cgit v1.2.3