From 054f35c2222ef251bc2877814cf7bf5ff6038166 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 28 Mar 1997 15:24:41 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- bin/hostname/hostname.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/hostname') diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c index a64beef..15aee00 100644 --- a/bin/hostname/hostname.c +++ b/bin/hostname/hostname.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: hostname.c,v 1.5 1997/02/22 14:03:42 peter Exp $ */ #ifndef lint @@ -62,7 +62,7 @@ main(argc,argv) char *p, hostname[MAXHOSTNAMELEN]; sflag = 0; - while ((ch = getopt(argc, argv, "s")) != EOF) + while ((ch = getopt(argc, argv, "s")) != -1) switch (ch) { case 's': sflag = 1; -- cgit v1.1