summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2007-03-20 03:31:22 +0000
committertedu <tedu@openbsd.org>2007-03-20 03:31:22 +0000
commit162cb51daaa3a8268869e7fd9f7467b0f9361ab9 (patch)
tree33070fd3ef9ae6ee63fce2a39736757a42b88b40
parentFake out target id for bioc_disk. (diff)
downloadwireguard-openbsd-162cb51daaa3a8268869e7fd9f7467b0f9361ab9.tar.xz
wireguard-openbsd-162cb51daaa3a8268869e7fd9f7467b0f9361ab9.zip
remove some bogus *p tests from charles longeau
ok deraadt millert
-rw-r--r--usr.sbin/afs/src/lib/ko/kocell.c8
-rw-r--r--usr.sbin/afs/src/milko/bos/kconf.c2
-rw-r--r--usr.sbin/afs/src/tools/release-tools/common.c2
-rw-r--r--usr.sbin/afs/src/util/log.c2
-rw-r--r--usr.sbin/bind/bin/nsupdate/nsupdate.c2
-rw-r--r--usr.sbin/bind/lib/dns/ttl.c2
-rw-r--r--usr.sbin/bind/lib/isc/string.c2
-rw-r--r--usr.sbin/httpd/src/main/util.c8
-rw-r--r--usr.sbin/httpd/src/main/util_date.c2
-rw-r--r--usr.sbin/httpd/src/main/util_script.c2
-rw-r--r--usr.sbin/httpd/src/modules/proxy/proxy_cache.c2
-rw-r--r--usr.sbin/httpd/src/modules/proxy/proxy_util.c2
-rw-r--r--usr.sbin/httpd/src/modules/standard/mod_imap.c2
-rw-r--r--usr.sbin/httpd/src/modules/standard/mod_negotiation.c6
14 files changed, 21 insertions, 23 deletions
diff --git a/usr.sbin/afs/src/lib/ko/kocell.c b/usr.sbin/afs/src/lib/ko/kocell.c
index 0d94ed4107d..acf6b89f06d 100644
--- a/usr.sbin/afs/src/lib/ko/kocell.c
+++ b/usr.sbin/afs/src/lib/ko/kocell.c
@@ -429,14 +429,14 @@ readdb (char *line, cell_entry* c, int *dbnum, int maxdbs,
return -1;
}
- while (*line && isspace((unsigned char)*line))
+ while (isspace((unsigned char)*line))
++line;
if (inet_aton (line, &numaddr) == 0) {
return -1;
}
- while (*line && !isspace((unsigned char)*line) && *line != '#')
+ while (!isspace((unsigned char)*line) && *line != '#')
++line;
hostname = line;
@@ -446,7 +446,7 @@ readdb (char *line, cell_entry* c, int *dbnum, int maxdbs,
eh = hostname;
- while (*eh && !isspace((unsigned char)*eh) && *eh != '#')
+ while (!isspace((unsigned char)*eh) && *eh != '#')
++eh;
*eh = '\0';
@@ -487,7 +487,7 @@ readcellservdb (const char *filename)
++lineno;
i = 0;
line[strcspn(line, "\n")] = '\0';
- while (line[0] && isspace((unsigned char)line[i]))
+ while (isspace((unsigned char)line[i]))
i++;
if (line[i] == '#' || line[i] == '\0')
continue;
diff --git a/usr.sbin/afs/src/milko/bos/kconf.c b/usr.sbin/afs/src/milko/bos/kconf.c
index 95daa76abc3..2afd76c34bb 100644
--- a/usr.sbin/afs/src/milko/bos/kconf.c
+++ b/usr.sbin/afs/src/milko/bos/kconf.c
@@ -136,8 +136,6 @@ parse_list(FILE *f, unsigned *lineno, kconf_config_binding **parent,
++p;
if (*p == '#' || *p == ';' || *p == '\0')
continue;
- while(isspace((unsigned char)*p))
- ++p;
if (*p == '}')
return 0;
if (*p == '\0')
diff --git a/usr.sbin/afs/src/tools/release-tools/common.c b/usr.sbin/afs/src/tools/release-tools/common.c
index a2ce166d83e..46cf2b7986c 100644
--- a/usr.sbin/afs/src/tools/release-tools/common.c
+++ b/usr.sbin/afs/src/tools/release-tools/common.c
@@ -63,7 +63,7 @@ estrntoll(const char *str, size_t len, int base)
num = strtol(p, &endptr, base);
#endif
- while(*endptr != '\0' && isspace((int)*endptr))
+ while(isspace((int)*endptr))
endptr++;
if (*endptr != '\0')
diff --git a/usr.sbin/afs/src/util/log.c b/usr.sbin/afs/src/util/log.c
index aa369fd7f4c..8e71601bbaa 100644
--- a/usr.sbin/afs/src/util/log.c
+++ b/usr.sbin/afs/src/util/log.c
@@ -632,7 +632,7 @@ parse_word (Log_method *m, char **str, Log_unit **u, char **log_str)
char *first;
if (**str == '\0') return 1;
- while (**str != '\0' && (isspace((unsigned char)**str) || **str == ';'))
+ while (isspace((unsigned char)**str) || **str == ';')
(*str)++;
if (**str == '\0') return 1;
diff --git a/usr.sbin/bind/bin/nsupdate/nsupdate.c b/usr.sbin/bind/bin/nsupdate/nsupdate.c
index 31add4a1a93..0247d15c66b 100644
--- a/usr.sbin/bind/bin/nsupdate/nsupdate.c
+++ b/usr.sbin/bind/bin/nsupdate/nsupdate.c
@@ -720,7 +720,7 @@ parse_rdata(char **cmdlinep, dns_rdataclass_t rdataclass,
dns_rdatacallbacks_t callbacks;
isc_result_t result;
- while (*cmdline != 0 && isspace((unsigned char)*cmdline))
+ while (isspace((unsigned char)*cmdline))
cmdline++;
if (*cmdline != 0) {
diff --git a/usr.sbin/bind/lib/dns/ttl.c b/usr.sbin/bind/lib/dns/ttl.c
index 003703aad21..15178b81114 100644
--- a/usr.sbin/bind/lib/dns/ttl.c
+++ b/usr.sbin/bind/lib/dns/ttl.c
@@ -165,7 +165,7 @@ bind_ttl(isc_textregion_t *source, isc_uint32_t *ttl) {
isc_result_t result;
char *np = nbuf;
- while (*s != '\0' && isdigit((unsigned char)*s))
+ while (isdigit((unsigned char)*s))
*np++ = *s++;
*np++ = '\0';
INSIST(np - nbuf <= (int)sizeof(nbuf));
diff --git a/usr.sbin/bind/lib/isc/string.c b/usr.sbin/bind/lib/isc/string.c
index 00a47a0ffeb..d01af8ac755 100644
--- a/usr.sbin/bind/lib/isc/string.c
+++ b/usr.sbin/bind/lib/isc/string.c
@@ -38,7 +38,7 @@ isc_string_touint64(char *source, char **end, int base) {
return (0);
}
- while (*s != 0 && isascii(*s&0xff) && isspace(*s&0xff))
+ while (isascii(*s&0xff) && isspace(*s&0xff))
s++;
if (*s == '+' /* || *s == '-' */)
s++;
diff --git a/usr.sbin/httpd/src/main/util.c b/usr.sbin/httpd/src/main/util.c
index 90e78c71c73..556416fa4dc 100644
--- a/usr.sbin/httpd/src/main/util.c
+++ b/usr.sbin/httpd/src/main/util.c
@@ -750,7 +750,7 @@ API_EXPORT(char *) ap_getword_conf(pool *p, const char **line)
char *res;
char quote;
- while (*str && ap_isspace(*str))
+ while (ap_isspace(*str))
++str;
if (!*str) {
@@ -782,7 +782,7 @@ API_EXPORT(char *) ap_getword_conf(pool *p, const char **line)
res = substring_conf(p, str, strend - str, 0);
}
- while (*strend && ap_isspace(*strend))
+ while (ap_isspace(*strend))
++strend;
*line = strend;
return res;
@@ -1314,7 +1314,7 @@ API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_wh
/* Find first non-white byte */
- while (*ptr && ap_isspace(*ptr))
+ while (ap_isspace(*ptr))
++ptr;
tok_start = ptr;
@@ -1336,7 +1336,7 @@ API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_wh
/* Advance accept_line pointer to the next non-white byte */
- while (*ptr && ap_isspace(*ptr))
+ while (ap_isspace(*ptr))
++ptr;
*accept_line = ptr;
diff --git a/usr.sbin/httpd/src/main/util_date.c b/usr.sbin/httpd/src/main/util_date.c
index b4324dad7db..f237279864e 100644
--- a/usr.sbin/httpd/src/main/util_date.c
+++ b/usr.sbin/httpd/src/main/util_date.c
@@ -232,7 +232,7 @@ API_EXPORT(time_t) ap_parseHTTPdate(const char *date)
if (!date)
return BAD_DATE;
- while (*date && ap_isspace(*date)) /* Find first non-whitespace char */
+ while (ap_isspace(*date)) /* Find first non-whitespace char */
++date;
if (*date == '\0')
diff --git a/usr.sbin/httpd/src/main/util_script.c b/usr.sbin/httpd/src/main/util_script.c
index 1b5d2a2758d..7029c1f6e73 100644
--- a/usr.sbin/httpd/src/main/util_script.c
+++ b/usr.sbin/httpd/src/main/util_script.c
@@ -504,7 +504,7 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
}
*l++ = '\0';
- while (*l && ap_isspace(*l)) {
+ while (ap_isspace(*l)) {
++l;
}
diff --git a/usr.sbin/httpd/src/modules/proxy/proxy_cache.c b/usr.sbin/httpd/src/modules/proxy/proxy_cache.c
index 04d1d66b44f..46cded628a6 100644
--- a/usr.sbin/httpd/src/modules/proxy/proxy_cache.c
+++ b/usr.sbin/httpd/src/modules/proxy/proxy_cache.c
@@ -997,7 +997,7 @@ int ap_proxy_cache_check(request_rec *r, char *url, struct cache_conf * conf,
/* isolate header name */
while (*vary && !ap_isspace(*vary) && (*vary != ','))
++vary;
- while (*vary && (ap_isspace(*vary) || (*vary == ','))) {
+ while (ap_isspace(*vary) || (*vary == ',')) {
*vary = '\0';
++vary;
}
diff --git a/usr.sbin/httpd/src/modules/proxy/proxy_util.c b/usr.sbin/httpd/src/modules/proxy/proxy_util.c
index a246f0e9f7c..08a53579c9e 100644
--- a/usr.sbin/httpd/src/modules/proxy/proxy_util.c
+++ b/usr.sbin/httpd/src/modules/proxy/proxy_util.c
@@ -1373,7 +1373,7 @@ void ap_proxy_clear_connection(pool *p, table *headers)
name = next;
while (*next && !ap_isspace(*next) && (*next != ','))
++next;
- while (*next && (ap_isspace(*next) || (*next == ','))) {
+ while (ap_isspace(*next) || (*next == ',')) {
*next = '\0';
++next;
}
diff --git a/usr.sbin/httpd/src/modules/standard/mod_imap.c b/usr.sbin/httpd/src/modules/standard/mod_imap.c
index 145deeaea70..c9bdea6e69e 100644
--- a/usr.sbin/httpd/src/modules/standard/mod_imap.c
+++ b/usr.sbin/httpd/src/modules/standard/mod_imap.c
@@ -699,7 +699,7 @@ static int imap_handler(request_rec *r)
if (!*string_pos) { /* need at least two fields */
goto need_2_fields;
}
- while(*string_pos && ap_isspace(*string_pos)) { /* past whitespace */
+ while(ap_isspace(*string_pos)) { /* past whitespace */
++string_pos;
}
diff --git a/usr.sbin/httpd/src/modules/standard/mod_negotiation.c b/usr.sbin/httpd/src/modules/standard/mod_negotiation.c
index 2455462fd65..4e68d887d55 100644
--- a/usr.sbin/httpd/src/modules/standard/mod_negotiation.c
+++ b/usr.sbin/httpd/src/modules/standard/mod_negotiation.c
@@ -369,7 +369,7 @@ static const char *get_entry(pool *p, accept_rec *result,
}
*cp++ = '\0'; /* Delimit var */
- while (*cp && (ap_isspace(*cp) || *cp == '=')) {
+ while (ap_isspace(*cp) || *cp == '=') {
++cp;
}
@@ -652,7 +652,7 @@ static enum header_state get_header_line(char *buffer, int len, FILE *map)
/* If blank, just return it --- this ends information on this variant */
- for (cp = buffer; (*cp && ap_isspace(*cp)); ++cp) {
+ for (cp = buffer; ap_isspace(*cp); ++cp) {
continue;
}
@@ -758,7 +758,7 @@ static char *lcase_header_name_return_body(char *header, request_rec *r)
do {
++cp;
- } while (*cp && ap_isspace(*cp));
+ } while (ap_isspace(*cp));
if (!*cp) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,