summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-03-20 03:43:51 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-03-20 03:43:51 +0000
commitb3cf0a4cb67d5932648c38d9b5aae818e90960d8 (patch)
tree506c2eafac2c980a71d85708618575c9a5ac2c55 /games
parentbff9547f6441e26f448c441a791504c44a056e5d (diff)
remove some bogus *p tests from charles longeau
ok deraadt millert
Diffstat (limited to 'games')
-rw-r--r--games/arithmetic/arithmetic.c6
-rw-r--r--games/hunt/huntd/conf.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c
index 367cee763b1..90f03ce1b2e 100644
--- a/games/arithmetic/arithmetic.c
+++ b/games/arithmetic/arithmetic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arithmetic.c,v 1.15 2004/07/09 15:59:26 deraadt Exp $ */
+/* $OpenBSD: arithmetic.c,v 1.16 2007/03/20 03:43:50 tedu Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.15 2004/07/09 15:59:26 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.16 2007/03/20 03:43:50 tedu Exp $";
#endif
#endif /* not lint */
@@ -236,7 +236,7 @@ retry:
(void)printf("\n");
return(EOF);
}
- for (p = line; *p && isspace(*p); ++p);
+ for (p = line; isspace(*p); ++p);
if (!isdigit(*p)) {
(void)printf("Please type a number.\n");
continue;
diff --git a/games/hunt/huntd/conf.c b/games/hunt/huntd/conf.c
index 84f83c547af..f13d36bef50 100644
--- a/games/hunt/huntd/conf.c
+++ b/games/hunt/huntd/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.6 2004/01/16 00:13:19 espie Exp $ */
+/* $OpenBSD: conf.c,v 1.7 2007/03/20 03:43:50 tedu Exp $ */
/* David Leonard <d@openbsd.org>, 1999. Public domain. */
#include <stdio.h>
@@ -137,7 +137,7 @@ parse_int(p, kvp, fnm, linep)
if (*p == '-')
p++;
digitstart = p;
- while (*p && isdigit(*p))
+ while (isdigit(*p))
p++;
if ((*p == '\0' || isspace(*p) || *p == '#') && digitstart != p) {
savec = *p;
@@ -190,7 +190,7 @@ parse_line(buf, fnm, line)
p = buf;
/* skip leading white */
- while (*p && isspace(*p))
+ while (isspace(*p))
p++;
/* allow blank lines and comment lines */
if (*p == '\0' || *p == '#')
@@ -198,9 +198,9 @@ parse_line(buf, fnm, line)
/* walk to the end of the word: */
word = p;
- if (*p && (isalpha(*p) || *p == '_')) {
+ if (isalpha(*p) || *p == '_') {
p++;
- while (*p && (isalpha(*p) || isdigit(*p) || *p == '_'))
+ while (isalpha(*p) || isdigit(*p) || *p == '_')
p++;
}
endword = p;
@@ -227,7 +227,7 @@ parse_line(buf, fnm, line)
}
/* skip whitespace */
- while (*p && isspace(*p))
+ while (isspace(*p))
p++;
if (*p++ != '=') {
@@ -236,7 +236,7 @@ parse_line(buf, fnm, line)
}
/* skip whitespace */
- while (*p && isspace(*p))
+ while (isspace(*p))
p++;
/* parse the value */
@@ -245,7 +245,7 @@ parse_line(buf, fnm, line)
return;
/* skip trailing whitespace */
- while (*p && isspace(*p))
+ while (isspace(*p))
p++;
if (*p && *p != '#') {