diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2007-03-20 03:40:07 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2007-03-20 03:40:07 +0000 |
commit | 357895d5616c8ffdfbdce99ee079c44b3b55aaba (patch) | |
tree | 43f0d33cbc721fa6ee6f40769fc845900f1d902d /lib/libform | |
parent | 94bab411a276ca02ad0192636b48b1d85de9573b (diff) |
remove some bogus *p tests from charles longeau
ok deraadt millert
Diffstat (limited to 'lib/libform')
-rw-r--r-- | lib/libform/fty_alnum.c | 8 | ||||
-rw-r--r-- | lib/libform/fty_alpha.c | 8 | ||||
-rw-r--r-- | lib/libform/fty_ipv4.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libform/fty_alnum.c b/lib/libform/fty_alnum.c index 7fb7ee74d2b..61a4fb7ab78 100644 --- a/lib/libform/fty_alnum.c +++ b/lib/libform/fty_alnum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fty_alnum.c,v 1.6 2001/01/22 18:02:16 millert Exp $ */ +/* $OpenBSD: fty_alnum.c,v 1.7 2007/03/20 03:40:05 tedu Exp $ */ /* @@ -90,15 +90,15 @@ static bool Check_AlphaNumeric_Field(FIELD * field, const void * argp) int l = -1; unsigned char *s; - while(*bp && *bp==' ') + while(*bp==' ') bp++; if (*bp) { s = bp; - while(*bp && isalnum(*bp)) + while(isalnum(*bp)) bp++; l = (int)(bp-s); - while(*bp && *bp==' ') + while(*bp==' ') bp++; } return ((*bp || (l < width)) ? FALSE : TRUE); diff --git a/lib/libform/fty_alpha.c b/lib/libform/fty_alpha.c index 579a675c575..34b2a4b4fe8 100644 --- a/lib/libform/fty_alpha.c +++ b/lib/libform/fty_alpha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fty_alpha.c,v 1.6 2001/01/22 18:02:17 millert Exp $ */ +/* $OpenBSD: fty_alpha.c,v 1.7 2007/03/20 03:40:05 tedu Exp $ */ /* @@ -91,15 +91,15 @@ static bool Check_Alpha_Field(FIELD * field, const void * argp) int l = -1; unsigned char *s; - while(*bp && *bp==' ') + while(*bp==' ') bp++; if (*bp) { s = bp; - while(*bp && isalpha(*bp)) + while(isalpha(*bp)) bp++; l = (int)(bp-s); - while(*bp && *bp==' ') + while(*bp==' ') bp++; } return ((*bp || (l < width)) ? FALSE : TRUE); diff --git a/lib/libform/fty_ipv4.c b/lib/libform/fty_ipv4.c index 162c96f9090..0cd429fdefa 100644 --- a/lib/libform/fty_ipv4.c +++ b/lib/libform/fty_ipv4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fty_ipv4.c,v 1.4 2001/01/22 18:02:17 millert Exp $ */ +/* $OpenBSD: fty_ipv4.c,v 1.5 2007/03/20 03:40:05 tedu Exp $ */ /* @@ -40,7 +40,7 @@ static bool Check_IPV4_Field(FIELD * field, const void * argp GCC_UNUSED) if (num == 4) { bp += len; /* Make bp point to what sscanf() left */ - while (*bp && isspace((unsigned char)*bp)) + while (isspace((unsigned char)*bp)) bp++; /* Allow trailing whitespace */ } } |