summaryrefslogtreecommitdiff
path: root/usr.sbin/afs
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-03-20 03:31:23 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-03-20 03:31:23 +0000
commita0fd6292c143af7a9ba853a814ccc8d0dfba0447 (patch)
treeeafc51e3e7421f3195b16185a2ad0936f309987e /usr.sbin/afs
parent4fb361555fcf43e72b6bdf72a64e1b1e2cf87513 (diff)
remove some bogus *p tests from charles longeau
ok deraadt millert
Diffstat (limited to 'usr.sbin/afs')
-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
4 files changed, 6 insertions, 8 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;