summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-01-20 17:19:31 +0000
committermillert <millert@openbsd.org>1997-01-20 17:19:31 +0000
commitddfa4c2e571313ab168586eba6d79ea0aa67c26f (patch)
treecb3a16639dd5f81b425b878c088d4c99d2ce3056
parentType pedantery.. a lot of it too, more could be done as well. Sync with (diff)
downloadwireguard-openbsd-ddfa4c2e571313ab168586eba6d79ea0aa67c26f.tar.xz
wireguard-openbsd-ddfa4c2e571313ab168586eba6d79ea0aa67c26f.zip
getopt returns -1 not EOF!
-rw-r--r--share/misc/getopt4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/misc/getopt b/share/misc/getopt
index b5ec0e43b11..e26ed541cdb 100644
--- a/share/misc/getopt
+++ b/share/misc/getopt
@@ -2,7 +2,7 @@
* Main/getopt(3) fragment.
*
* from: @(#)getopt 5.3 (Berkeley) 3/28/94
- * $Id: getopt,v 1.1.1.1 1995/10/18 08:44:44 deraadt Exp $
+ * $Id: getopt,v 1.2 1997/01/20 17:19:31 millert Exp $
*/
#include <sys/types.h>
@@ -18,7 +18,7 @@ main(argc, argv)
{
int ch;
- while ((ch = getopt(argc, argv, "")) != EOF)
+ while ((ch = getopt(argc, argv, "")) != -1)
switch (ch) {
case '':
break;