From 9b0ec8954aebe8d8c8e923e656761ed984d24928 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 10 Jul 2008 18:29:52 +0000 Subject: [PATCH] style: compare return value of getopt() against -1 rather than EOF --- games/fortune/strfile/strfile.c | 4 ++-- gnu/usr.bin/man/man/man.c | 4 ++-- gnu/usr.bin/man/manpath/manpath.c | 4 ++-- lib/libc/db/test/btree.tests/main.c | 4 ++-- lib/libc/db/test/dbtest.c | 4 ++-- secure/usr.bin/bdes/bdes.c | 4 ++-- share/examples/ppi/ppilcd.c | 4 ++-- usr.bin/btpin/btpin.c | 4 ++-- usr.bin/colldef/parse.y | 6 +++--- usr.bin/iconv/iconv.c | 4 ++-- usr.bin/mkcsmapper/yacc.y | 4 ++-- usr.bin/mkesdb/yacc.y | 4 ++-- usr.bin/mklocale/yacc.y | 4 ++-- usr.bin/ncplist/ncplist.c | 4 ++-- usr.bin/ncplogin/ncplogin.c | 6 +++--- usr.sbin/apmd/apmd.c | 4 ++-- usr.sbin/apmd/contrib/pccardq.c | 4 ++-- usr.sbin/ngctl/list.c | 4 ++-- usr.sbin/ngctl/main.c | 4 ++-- usr.sbin/ngctl/show.c | 4 ++-- usr.sbin/nghook/main.c | 4 ++-- 21 files changed, 44 insertions(+), 44 deletions(-) diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c index 4cf2d9c82f..81d2e311bb 100644 --- a/games/fortune/strfile/strfile.c +++ b/games/fortune/strfile/strfile.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/games/fortune/strfile/strfile.c,v 1.15.2.2 2001/03/05 11:52:37 kris Exp $ - * $DragonFly: src/games/fortune/strfile/strfile.c,v 1.5 2006/08/08 16:58:59 pavalos Exp $ + * $DragonFly: src/games/fortune/strfile/strfile.c,v 1.6 2008/07/10 18:29:51 swildner Exp $ * * @(#) Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved. * @(#)strfile.c 8.1 (Berkeley) 5/31/93 @@ -253,7 +253,7 @@ getargs(int argc, char **argv) { int ch; - while ((ch = getopt(argc, argv, "Cc:iorsx")) != EOF) + while ((ch = getopt(argc, argv, "Cc:iorsx")) != -1) switch(ch) { case 'C': /* embedded comments */ Cflag++; diff --git a/gnu/usr.bin/man/man/man.c b/gnu/usr.bin/man/man/man.c index 3f4696c6bc..ef56936415 100644 --- a/gnu/usr.bin/man/man/man.c +++ b/gnu/usr.bin/man/man/man.c @@ -14,7 +14,7 @@ * Austin, Texas 78712 * * $FreeBSD: src/gnu/usr.bin/man/man/man.c,v 1.37.2.10 2003/02/14 15:38:51 ru Exp $ - * $DragonFly: src/gnu/usr.bin/man/man/man.c,v 1.8 2008/04/04 19:25:46 swildner Exp $ + * $DragonFly: src/gnu/usr.bin/man/man/man.c,v 1.9 2008/07/10 18:29:51 swildner Exp $ */ #define MAN_MAIN @@ -331,7 +331,7 @@ man_getopt (argc, argv) extern void downcase (); extern char *manpath (); - while ((c = getopt (argc, argv, args)) != EOF) + while ((c = getopt (argc, argv, args)) != -1) { switch (c) { diff --git a/gnu/usr.bin/man/manpath/manpath.c b/gnu/usr.bin/man/manpath/manpath.c index ffc5175275..96d2b88a73 100644 --- a/gnu/usr.bin/man/manpath/manpath.c +++ b/gnu/usr.bin/man/manpath/manpath.c @@ -14,7 +14,7 @@ * Austin, Texas 78712 * * $FreeBSD: src/gnu/usr.bin/man/manpath/manpath.c,v 1.11.2.2 2003/02/15 05:33:06 kris Exp $ - * $DragonFly: src/gnu/usr.bin/man/manpath/manpath.c,v 1.4 2007/05/12 09:18:52 swildner Exp $ + * $DragonFly: src/gnu/usr.bin/man/manpath/manpath.c,v 1.5 2008/07/10 18:29:51 swildner Exp $ */ #define MANPATH_MAIN @@ -79,7 +79,7 @@ main(argc, argv) prognam = mkprogname (argv[0]); - while ((c = getopt (argc, argv, "dhLq?")) != EOF) + while ((c = getopt (argc, argv, "dhLq?")) != -1) { switch (c) { diff --git a/lib/libc/db/test/btree.tests/main.c b/lib/libc/db/test/btree.tests/main.c index c9440503e9..3f2dfb8e47 100644 --- a/lib/libc/db/test/btree.tests/main.c +++ b/lib/libc/db/test/btree.tests/main.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)main.c 8.1 (Berkeley) 6/4/93 - * $DragonFly: src/lib/libc/db/test/btree.tests/main.c,v 1.7 2005/11/12 23:01:55 swildner Exp $ + * $DragonFly: src/lib/libc/db/test/btree.tests/main.c,v 1.8 2008/07/10 18:29:51 swildner Exp $ */ #include @@ -128,7 +128,7 @@ main(int argc, char **argv) b.prefix = NULL; b.lorder = 0; - while ((c = getopt(argc, argv, "bc:di:lp:ru")) != EOF) { + while ((c = getopt(argc, argv, "bc:di:lp:ru")) != -1) { switch (c) { case 'b': b.lorder = BIG_ENDIAN; diff --git a/lib/libc/db/test/dbtest.c b/lib/libc/db/test/dbtest.c index dc9a82c5eb..57e7d0c39f 100644 --- a/lib/libc/db/test/dbtest.c +++ b/lib/libc/db/test/dbtest.c @@ -29,7 +29,7 @@ * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)dbtest.c 8.17 (Berkeley) 9/1/94 * $FreeBSD: src/lib/libc/db/test/dbtest.c,v 1.3.8.1 2000/08/21 22:44:47 jhb Exp $ - * $DragonFly: src/lib/libc/db/test/dbtest.c,v 1.7 2005/11/12 23:01:55 swildner Exp $ + * $DragonFly: src/lib/libc/db/test/dbtest.c,v 1.8 2008/07/10 18:29:51 swildner Exp $ */ #include @@ -90,7 +90,7 @@ main(int argc, char *argv[]) fname = NULL; oflags = O_CREAT | O_RDWR; sflag = 0; - while ((ch = getopt(argc, argv, "f:i:lo:s")) != EOF) + while ((ch = getopt(argc, argv, "f:i:lo:s")) != -1) switch (ch) { case 'f': fname = optarg; diff --git a/secure/usr.bin/bdes/bdes.c b/secure/usr.bin/bdes/bdes.c index b7e6b3df2c..6657f88ab6 100644 --- a/secure/usr.bin/bdes/bdes.c +++ b/secure/usr.bin/bdes/bdes.c @@ -40,7 +40,7 @@ * @(#) Copyright (c) 1991, 1993 The Regents of the University of California. All rights reserved. * @(#)bdes.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/secure/usr.bin/bdes/bdes.c,v 1.3.2.1 2000/09/22 09:42:03 kris Exp $ - * $DragonFly: src/secure/usr.bin/bdes/bdes.c,v 1.3 2005/03/09 02:53:03 drhodus Exp $ + * $DragonFly: src/secure/usr.bin/bdes/bdes.c,v 1.4 2008/07/10 18:29:51 swildner Exp $ */ /* @@ -168,7 +168,7 @@ main(int argc, char **argv) /* process the argument list */ kflag = 0; - while ((i = getopt(argc, argv, "abdF:f:k:m:o:pv:")) != EOF) + while ((i = getopt(argc, argv, "abdF:f:k:m:o:pv:")) != -1) switch(i) { case 'a': /* key is ASCII */ keybase = KEY_ASCII; diff --git a/share/examples/ppi/ppilcd.c b/share/examples/ppi/ppilcd.c index 778764ba1a..17d9f94e38 100644 --- a/share/examples/ppi/ppilcd.c +++ b/share/examples/ppi/ppilcd.c @@ -3,7 +3,7 @@ * ppi 'geek port' interface. * * $FreeBSD: src/share/examples/ppi/ppilcd.c,v 1.2.2.1 2003/01/05 19:45:29 semenu Exp $ - * $DragonFly: src/share/examples/ppi/ppilcd.c,v 1.2 2003/06/17 04:36:57 dillon Exp $ + * $DragonFly: src/share/examples/ppi/ppilcd.c,v 1.3 2008/07/10 18:29:51 swildner Exp $ */ #include @@ -108,7 +108,7 @@ main(int argc, char *argv[]) drivertype = getenv("LCD_TYPE"); - while ((ch = getopt(argc, argv, "Dd:f:o:v")) != EOF) { + while ((ch = getopt(argc, argv, "Dd:f:o:v")) != -1) { switch(ch) { case 'D': debuglevel++; diff --git a/usr.bin/btpin/btpin.c b/usr.bin/btpin/btpin.c index 6b35072eed..6b98d33274 100644 --- a/usr.bin/btpin/btpin.c +++ b/usr.bin/btpin/btpin.c @@ -1,5 +1,5 @@ /* $NetBSD: btpin.c,v 1.3 2007/04/14 09:28:39 plunky Exp $ */ -/* $DragonFly: src/usr.bin/btpin/btpin.c,v 1.1 2008/02/08 14:06:25 hasso Exp $ */ +/* $DragonFly: src/usr.bin/btpin/btpin.c,v 1.2 2008/07/10 18:29:51 swildner Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -60,7 +60,7 @@ main(int ac, char *av[]) un.sun_family = AF_LOCAL; strlcpy(un.sun_path, BTHCID_SOCKET_NAME, sizeof(un.sun_path)); - while ((ch = getopt(ac, av, "a:d:l:p:rs:")) != EOF) { + while ((ch = getopt(ac, av, "a:d:l:p:rs:")) != -1) { switch (ch) { case 'a': if (!bt_aton(optarg, &rp.raddr)) { diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y index 39bf523ec2..4a2ddcce30 100644 --- a/usr.bin/colldef/parse.y +++ b/usr.bin/colldef/parse.y @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/colldef/parse.y,v 1.15.2.5 2002/10/11 10:43:45 ache Exp $ - * $DragonFly: src/usr.bin/colldef/parse.y,v 1.5 2006/10/25 08:27:27 swildner Exp $ + * $DragonFly: src/usr.bin/colldef/parse.y,v 1.6 2008/07/10 18:29:51 swildner Exp $ */ #include @@ -298,9 +298,9 @@ main(int ac, char **av) int ch; #ifdef COLLATE_DEBUG - while((ch = getopt(ac, av, ":do:I:")) != EOF) { + while((ch = getopt(ac, av, ":do:I:")) != -1) { #else - while((ch = getopt(ac, av, ":o:I:")) != EOF) { + while((ch = getopt(ac, av, ":o:I:")) != -1) { #endif switch (ch) { diff --git a/usr.bin/iconv/iconv.c b/usr.bin/iconv/iconv.c index 92879b9760..d7ec20873e 100644 --- a/usr.bin/iconv/iconv.c +++ b/usr.bin/iconv/iconv.c @@ -1,5 +1,5 @@ /* $NetBSD: iconv.c,v 1.4 2003/10/20 12:56:18 yamt Exp $ */ -/* $DragonFly: src/usr.bin/iconv/iconv.c,v 1.1 2005/03/11 19:16:53 joerg Exp $ */ +/* $DragonFly: src/usr.bin/iconv/iconv.c,v 1.2 2008/07/10 18:29:51 swildner Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -160,7 +160,7 @@ main(int argc, char **argv) char *opt_f = NULL, *opt_t = NULL; FILE *fp; - while ((ch=getopt(argc, argv, "cslf:t:")) != EOF) { + while ((ch=getopt(argc, argv, "cslf:t:")) != -1) { switch (ch) { case 'c': opt_c = 1; diff --git a/usr.bin/mkcsmapper/yacc.y b/usr.bin/mkcsmapper/yacc.y index a7ceea6690..53bf356811 100644 --- a/usr.bin/mkcsmapper/yacc.y +++ b/usr.bin/mkcsmapper/yacc.y @@ -1,5 +1,5 @@ /* $NetBSD: yacc.y,v 1.7 2006/09/09 14:35:17 tnozaki Exp $ */ -/* $DragonFly: src/usr.bin/mkcsmapper/yacc.y,v 1.2 2008/04/10 10:21:13 hasso Exp $ */ +/* $DragonFly: src/usr.bin/mkcsmapper/yacc.y,v 1.3 2008/07/10 18:29:51 swildner Exp $ */ %{ /*- @@ -679,7 +679,7 @@ main(int argc, char **argv) FILE *in = NULL; int mkdb = 0, mkpv = 0; - while ((ch = getopt(argc, argv, "do:mp")) != EOF) { + while ((ch = getopt(argc, argv, "do:mp")) != -1) { switch (ch) { case 'd': debug=1; diff --git a/usr.bin/mkesdb/yacc.y b/usr.bin/mkesdb/yacc.y index 604d0fc594..8d85ab5045 100644 --- a/usr.bin/mkesdb/yacc.y +++ b/usr.bin/mkesdb/yacc.y @@ -1,5 +1,5 @@ /* $NetBSD: src/usr.bin/mkesdb/yacc.y,v 1.3 2004/01/02 12:09:48 itojun Exp $ */ -/* $DragonFly: src/usr.bin/mkesdb/yacc.y,v 1.1 2005/03/11 20:17:11 joerg Exp $ */ +/* $DragonFly: src/usr.bin/mkesdb/yacc.y,v 1.2 2008/07/10 18:29:51 swildner Exp $ */ %{ /*- @@ -298,7 +298,7 @@ main(int argc, char **argv) FILE *in = NULL; int mkdb = 0; - while ((ch=getopt(argc, argv, "do:m")) != EOF) { + while ((ch=getopt(argc, argv, "do:m")) != -1) { switch (ch) { case 'd': debug = 1; diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y index b179b77dba..f5e6fd5681 100644 --- a/usr.bin/mklocale/yacc.y +++ b/usr.bin/mklocale/yacc.y @@ -1,5 +1,5 @@ /* $NetBSD: src/usr.bin/mklocale/yacc.y,v 1.24 2004/01/05 23:23:36 jmmv Exp $ */ -/* $DragonFly: src/usr.bin/mklocale/yacc.y,v 1.7 2005/04/21 16:36:35 joerg Exp $ */ +/* $DragonFly: src/usr.bin/mklocale/yacc.y,v 1.8 2008/07/10 18:29:52 swildner Exp $ */ %{ /*- @@ -241,7 +241,7 @@ main(int ac, char *av[]) { int x; - while ((x = getopt(ac, av, "do:")) != EOF) { + while ((x = getopt(ac, av, "do:")) != -1) { switch(x) { case 'd': debug = 1; diff --git a/usr.bin/ncplist/ncplist.c b/usr.bin/ncplist/ncplist.c index 840b319f76..bb7c81bd8b 100644 --- a/usr.bin/ncplist/ncplist.c +++ b/usr.bin/ncplist/ncplist.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/ncplist/ncplist.c,v 1.1 1999/10/20 11:31:02 bp Exp $ - * $DragonFly: src/usr.bin/ncplist/ncplist.c,v 1.2 2003/06/17 04:29:30 dillon Exp $ + * $DragonFly: src/usr.bin/ncplist/ncplist.c,v 1.3 2008/07/10 18:29:52 swildner Exp $ */ #include #include @@ -368,7 +368,7 @@ main(int argc, char *argv[]) { bzero(args, sizeof(args)); what = LO_NONE; - while ((opt = getopt(argc, argv, "h")) != EOF) { + while ((opt = getopt(argc, argv, "h")) != -1) { switch (opt) { case 'h': case '?': help(); diff --git a/usr.bin/ncplogin/ncplogin.c b/usr.bin/ncplogin/ncplogin.c index 4b8c8aec16..e9f52e15a1 100644 --- a/usr.bin/ncplogin/ncplogin.c +++ b/usr.bin/ncplogin/ncplogin.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/ncplogin/ncplogin.c,v 1.1 1999/10/31 02:14:59 bp Exp $ - * $DragonFly: src/usr.bin/ncplogin/ncplogin.c,v 1.4 2007/05/13 18:33:58 swildner Exp $ + * $DragonFly: src/usr.bin/ncplogin/ncplogin.c,v 1.5 2008/07/10 18:29:52 swildner Exp $ */ #include #include @@ -64,7 +64,7 @@ static void login(int argc, char *argv[], struct ncp_conn_loginfo *li) { int error = 0, connid, opt, setprimary = 0; - while ((opt = getopt(argc, argv, STDPARAM_OPT"D")) != EOF){ + while ((opt = getopt(argc, argv, STDPARAM_OPT"D")) != -1){ switch(opt){ case STDPARAM_ARGS: if (ncp_li_arg(li, opt, optarg)) @@ -105,7 +105,7 @@ logout(int argc, char *argv[], struct ncp_conn_loginfo *li) { int error = 0, connid, opt; connid = -1; - while ((opt = getopt(argc, argv, STDPARAM_OPT"c:")) != EOF){ + while ((opt = getopt(argc, argv, STDPARAM_OPT"c:")) != -1){ switch (opt) { case 'c': connid = atoi(optarg); diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c index c7b5cc86cd..bcefcde4be 100644 --- a/usr.sbin/apmd/apmd.c +++ b/usr.sbin/apmd/apmd.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/apmd/apmd.c,v 1.3.2.1 2001/08/13 17:30:30 nsayer Exp $ - * $DragonFly: src/usr.sbin/apmd/apmd.c,v 1.6 2007/12/27 15:29:40 matthias Exp $ + * $DragonFly: src/usr.sbin/apmd/apmd.c,v 1.7 2008/07/10 18:29:52 swildner Exp $ */ #include @@ -626,7 +626,7 @@ main(int ac, char* av[]) char *prog; int logopt = LOG_NDELAY | LOG_PID; - while ((ch = getopt(ac, av, "df:v")) != EOF) { + while ((ch = getopt(ac, av, "df:v")) != -1) { switch (ch) { case 'd': daemonize = 0; diff --git a/usr.sbin/apmd/contrib/pccardq.c b/usr.sbin/apmd/contrib/pccardq.c index 1d72a58e14..58637075f2 100644 --- a/usr.sbin/apmd/contrib/pccardq.c +++ b/usr.sbin/apmd/contrib/pccardq.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/usr.sbin/apmd/contrib/pccardq.c,v 1.2 1999/08/28 05:11:25 peter Exp $ */ -/* $DragonFly: src/usr.sbin/apmd/contrib/pccardq.c,v 1.3 2005/12/05 01:04:00 swildner Exp $ */ +/* $DragonFly: src/usr.sbin/apmd/contrib/pccardq.c,v 1.4 2008/07/10 18:29:52 swildner Exp $ */ #include #include @@ -37,7 +37,7 @@ proc_arg(int ac, char **av) tmp_dir = getenv("TMPDIR") ? getenv("TMPDIR") : tmp_dir; - while ((ch = getopt(ac, av, "ans:")) != EOF) { + while ((ch = getopt(ac, av, "ans:")) != -1) { switch (ch) { case 'a': slot_map = ~0; diff --git a/usr.sbin/ngctl/list.c b/usr.sbin/ngctl/list.c index 3c5275ad21..77fa86afed 100644 --- a/usr.sbin/ngctl/list.c +++ b/usr.sbin/ngctl/list.c @@ -34,7 +34,7 @@ * OF SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/ngctl/list.c,v 1.2 1999/11/30 02:45:30 archie Exp $ - * $DragonFly: src/usr.sbin/ngctl/list.c,v 1.5 2007/06/04 00:40:31 swildner Exp $ + * $DragonFly: src/usr.sbin/ngctl/list.c,v 1.6 2008/07/10 18:29:52 swildner Exp $ */ #include "ngctl.h" @@ -63,7 +63,7 @@ ListCmd(int ac, const char **av) /* Get options */ optind = 1; - while ((ch = getopt(ac, __DECONST(char **, av), "n")) != EOF) { + while ((ch = getopt(ac, __DECONST(char **, av), "n")) != -1) { switch (ch) { case 'n': named_only = 1; diff --git a/usr.sbin/ngctl/main.c b/usr.sbin/ngctl/main.c index 232f01fe40..efefc56824 100644 --- a/usr.sbin/ngctl/main.c +++ b/usr.sbin/ngctl/main.c @@ -34,7 +34,7 @@ * OF SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/ngctl/main.c,v 1.4.2.4 2002/02/01 18:17:43 archie Exp $ - * $DragonFly: src/usr.sbin/ngctl/main.c,v 1.5 2007/06/04 00:40:31 swildner Exp $ + * $DragonFly: src/usr.sbin/ngctl/main.c,v 1.6 2008/07/10 18:29:52 swildner Exp $ * $Whistle: main.c,v 1.12 1999/11/29 19:17:46 archie Exp $ */ @@ -119,7 +119,7 @@ main(int ac, char *av[]) snprintf(name, sizeof(name), "ngctl%d", getpid()); /* Parse command line */ - while ((ch = getopt(ac, av, "df:n:")) != EOF) { + while ((ch = getopt(ac, av, "df:n:")) != -1) { switch (ch) { case 'd': NgSetDebug(NgSetDebug(-1) + 1); diff --git a/usr.sbin/ngctl/show.c b/usr.sbin/ngctl/show.c index e85a63630a..341ee40693 100644 --- a/usr.sbin/ngctl/show.c +++ b/usr.sbin/ngctl/show.c @@ -34,7 +34,7 @@ * OF SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/ngctl/show.c,v 1.2 1999/11/30 02:45:31 archie Exp $ - * $DragonFly: src/usr.sbin/ngctl/show.c,v 1.4 2005/03/16 05:19:11 joerg Exp $ + * $DragonFly: src/usr.sbin/ngctl/show.c,v 1.5 2008/07/10 18:29:52 swildner Exp $ */ #include "ngctl.h" @@ -65,7 +65,7 @@ ShowCmd(int ac, const char **av) /* Get options */ optind = 1; - while ((ch = getopt(ac, __DECONST(char **, av), "n")) != EOF) { + while ((ch = getopt(ac, __DECONST(char **, av), "n")) != -1) { switch (ch) { case 'n': no_hooks = 1; diff --git a/usr.sbin/nghook/main.c b/usr.sbin/nghook/main.c index 457a1413ad..bf4891dd93 100644 --- a/usr.sbin/nghook/main.c +++ b/usr.sbin/nghook/main.c @@ -35,7 +35,7 @@ * OF SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/nghook/main.c,v 1.4 1999/11/30 02:09:36 archie Exp $ - * $DragonFly: src/usr.sbin/nghook/main.c,v 1.4 2005/03/16 05:27:27 joerg Exp $ + * $DragonFly: src/usr.sbin/nghook/main.c,v 1.5 2008/07/10 18:29:52 swildner Exp $ * $Whistle: main.c,v 1.9 1999/01/20 00:26:26 archie Exp $ */ @@ -75,7 +75,7 @@ main(int ac, char *av[]) int ch; /* Parse flags */ - while ((ch = getopt(ac, av, "da")) != EOF) { + while ((ch = getopt(ac, av, "da")) != -1) { switch (ch) { case 'd': NgSetDebug(NgSetDebug(-1) + 1); -- 2.11.4.GIT