getopt(3): EOF -> -1.
This commit is contained in:
parent
d9bcf0f87a
commit
a0649bd297
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mld6.c,v 1.3 2000/12/04 07:04:37 itojun Exp $ */
|
||||
/* $NetBSD: mld6.c,v 1.4 2001/05/07 14:00:22 kleink Exp $ */
|
||||
/* $KAME: mld6.c,v 1.9 2000/12/04 06:29:37 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -80,7 +80,7 @@ main(int argc, char *argv[])
|
||||
int ch;
|
||||
|
||||
type = MLD6_LISTENER_QUERY;
|
||||
while ((ch = getopt(argc, argv, "d")) != EOF) {
|
||||
while ((ch = getopt(argc, argv, "d")) != -1) {
|
||||
switch (ch) {
|
||||
case 'd':
|
||||
type = MLD6_LISTENER_DONE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ndp.c,v 1.14 2001/03/21 15:28:29 itojun Exp $ */
|
||||
/* $NetBSD: ndp.c,v 1.15 2001/05/07 14:00:22 kleink Exp $ */
|
||||
/* $KAME: ndp.c,v 1.62 2001/03/21 15:26:32 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -177,7 +177,7 @@ main(argc, argv)
|
||||
|
||||
pid = getpid();
|
||||
thiszone = gmt2local(0);
|
||||
while ((ch = getopt(argc, argv, "acndfIilprstA:HPR")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "acndfIilprstA:HPR")) != -1)
|
||||
switch ((char)ch) {
|
||||
case 'a':
|
||||
aflag = 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pvcsif.c,v 1.2 1999/07/11 17:35:07 itojun Exp $ */
|
||||
/* $NetBSD: pvcsif.c,v 1.3 2001/05/07 14:00:23 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1998
|
||||
@ -70,7 +70,7 @@ main(int argc, char **argv)
|
||||
strncpy(ifr.ifr_name, argv[1], IFNAMSIZ-1);
|
||||
|
||||
optind = 2;
|
||||
while ((ch = getopt(argc, argv, "s")) != EOF) {
|
||||
while ((ch = getopt(argc, argv, "s")) != -1) {
|
||||
switch (ch) {
|
||||
case 's':
|
||||
shell_mode = 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pvctxctl.c,v 1.2 1999/07/11 17:35:08 itojun Exp $ */
|
||||
/* $NetBSD: pvctxctl.c,v 1.3 2001/05/07 14:00:23 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1998
|
||||
@ -80,7 +80,7 @@ main(int argc, char **argv)
|
||||
str2vc(argv[2], &vpi, &vci);
|
||||
|
||||
optind = 3;
|
||||
while ((ch = getopt(argc, argv, "p:b:j:snv")) != EOF) {
|
||||
while ((ch = getopt(argc, argv, "p:b:j:snv")) != -1) {
|
||||
switch (ch) {
|
||||
case 'p':
|
||||
pcr = strtol(optarg, NULL, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rip6query.c,v 1.5 2001/04/06 11:13:51 wiz Exp $ */
|
||||
/* $NetBSD: rip6query.c,v 1.6 2001/05/07 14:00:22 kleink Exp $ */
|
||||
/* $KAME: rip6query.c,v 1.9 2000/12/19 23:54:01 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -85,7 +85,7 @@ main(argc, argv)
|
||||
char pbuf[10];
|
||||
struct addrinfo hints, *res;
|
||||
|
||||
while ((c = getopt(argc, argv, "I:")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "I:")) != -1) {
|
||||
switch (c) {
|
||||
case 'I':
|
||||
ifidx = if_nametoindex(optarg);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: route6d.c,v 1.26 2001/04/06 11:13:51 wiz Exp $ */
|
||||
/* $NetBSD: route6d.c,v 1.27 2001/05/07 14:00:23 kleink Exp $ */
|
||||
/* $KAME: route6d.c,v 1.60 2001/03/08 02:15:42 onoe Exp $ */
|
||||
|
||||
/*
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: route6d.c,v 1.26 2001/04/06 11:13:51 wiz Exp $");
|
||||
__RCSID("$NetBSD: route6d.c,v 1.27 2001/05/07 14:00:23 kleink Exp $");
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@ -295,7 +295,7 @@ main(argc, argv)
|
||||
progname = *argv;
|
||||
|
||||
pid = getpid();
|
||||
while ((ch = getopt(argc, argv, "A:N:O:R:T:L:t:adDhlnqsS")) != EOF) {
|
||||
while ((ch = getopt(argc, argv, "A:N:O:R:T:L:t:adDhlnqsS")) != -1) {
|
||||
switch (ch) {
|
||||
case 'A':
|
||||
case 'N':
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: traceroute6.c,v 1.16 2001/01/12 18:53:21 itojun Exp $ */
|
||||
/* $NetBSD: traceroute6.c,v 1.17 2001/05/07 14:00:23 kleink Exp $ */
|
||||
/* $KAME: traceroute6.c,v 1.39 2000/12/22 15:11:05 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -79,7 +79,7 @@ static char sccsid[] = "@(#)traceroute.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: traceroute6.c,v 1.16 2001/01/12 18:53:21 itojun Exp $");
|
||||
__RCSID("$NetBSD: traceroute6.c,v 1.17 2001/05/07 14:00:23 kleink Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -426,7 +426,7 @@ main(argc, argv)
|
||||
|
||||
seq = 0;
|
||||
|
||||
while ((ch = getopt(argc, argv, "df:g:lm:np:q:rs:w:v")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "df:g:lm:np:q:rs:w:v")) != -1)
|
||||
switch(ch) {
|
||||
case 'd':
|
||||
options |= SO_DEBUG;
|
||||
|
Loading…
Reference in New Issue
Block a user