diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2007-03-20 03:43:51 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2007-03-20 03:43:51 +0000 |
commit | b3cf0a4cb67d5932648c38d9b5aae818e90960d8 (patch) | |
tree | 506c2eafac2c980a71d85708618575c9a5ac2c55 /games/hunt/huntd/conf.c | |
parent | bff9547f6441e26f448c441a791504c44a056e5d (diff) |
remove some bogus *p tests from charles longeau
ok deraadt millert
Diffstat (limited to 'games/hunt/huntd/conf.c')
-rw-r--r-- | games/hunt/huntd/conf.c | 16 |
1 files changed, 8 insertions, 8 deletions
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 != '#') { |