summaryrefslogtreecommitdiffstats
path: root/usr.sbin/apmd
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2007-02-05 07:35:23 +0000
committerkevlo <kevlo@FreeBSD.org>2007-02-05 07:35:23 +0000
commitcf67f3127e8978432bb80927bce24d8c26e438c8 (patch)
tree60ca758783787b2fc287d734e5bd467de5f6c06f /usr.sbin/apmd
parent4881bd38e2f4061efa354e25c1c66cc0275393a7 (diff)
downloadFreeBSD-src-cf67f3127e8978432bb80927bce24d8c26e438c8.zip
FreeBSD-src-cf67f3127e8978432bb80927bce24d8c26e438c8.tar.gz
getopt(3) returns -1, not EOF when out of args.
Diffstat (limited to 'usr.sbin/apmd')
-rw-r--r--usr.sbin/apmd/apmd.c2
-rw-r--r--usr.sbin/apmd/contrib/pccardq.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 0b8ef93..67351f8 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -650,7 +650,7 @@ main(int ac, char* av[])
char *prog;
int logopt = LOG_NDELAY | LOG_PID;
- while ((ch = getopt(ac, av, "df:sv")) != EOF) {
+ while ((ch = getopt(ac, av, "df:sv")) != -1) {
switch (ch) {
case 'd':
daemonize = 0;
diff --git a/usr.sbin/apmd/contrib/pccardq.c b/usr.sbin/apmd/contrib/pccardq.c
index 1562c55f..e619770 100644
--- a/usr.sbin/apmd/contrib/pccardq.c
+++ b/usr.sbin/apmd/contrib/pccardq.c
@@ -36,7 +36,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;
OpenPOWER on IntegriCloud