From: Ralph Corderoy Date: Sun, 10 Sep 2017 16:19:56 +0000 (+0100) Subject: Remove test for `\0' in `*s && isfoo(*s)' for ctype.h calls. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/3736af69c183d472642ed17375b0970f5239e6e5?ds=inline Remove test for `\0' in `*s && isfoo(*s)' for ctype.h calls. --- diff --git a/sbr/credentials.c b/sbr/credentials.c index 82e3c292..d3e8075f 100644 --- a/sbr/credentials.c +++ b/sbr/credentials.c @@ -30,7 +30,8 @@ init_credentials_file(void) { struct stat st; char *filename = strchr(cred_style, ':') + 1; - while (*filename && isspace ((unsigned char) *filename)) ++filename; + while (isspace((unsigned char)*filename)) + filename++; if (*filename == '/') { credentials_file = filename; diff --git a/sbr/m_convert.c b/sbr/m_convert.c index 566b02a5..c4e629cb 100644 --- a/sbr/m_convert.c +++ b/sbr/m_convert.c @@ -371,7 +371,7 @@ attr (struct msgs *mp, char *cp) convdir = 1; /* convert direction */ - for (dp = cp; *dp && isalnum((unsigned char) *dp); dp++) + for (dp = cp; isalnum((unsigned char)*dp); dp++) continue; if (*dp == ':') { diff --git a/uip/flist.c b/uip/flist.c index cd5682af..f40f010d 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -410,7 +410,7 @@ BuildFolderListRecurse(char *dirName, struct stat *s, int searchdepth) /* Check to see if the name of the file is a number * if it is, we assume it's a mail file and skip it */ - for (n = dp->d_name; *n && isdigit((unsigned char) *n); n++); + for (n = dp->d_name; isdigit((unsigned char)*n); n++); if (!*n) continue; strncpy (name, base, sizeof(name) - 2); diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 672d830b..4e7f0e69 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -1114,7 +1114,7 @@ fix_composite_cte (CT ct, int *message_mods) { for (hf = ct->c_first_hf; hf; hf = hf->next) { char *name = hf->name; - for (; *name && isspace ((unsigned char) *name); ++name) { + for (; isspace((unsigned char)*name); ++name) { continue; } diff --git a/uip/mhparse.c b/uip/mhparse.c index 2e1beb96..ac8c1ce5 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -1108,7 +1108,7 @@ InitMultiPart (CT ct) bp = cte + strlen (cte) - 1; while (bp >= cte && isspace ((unsigned char) *bp)) *bp-- = '\0'; - for (bp = cte; *bp && isblank ((unsigned char) *bp); ++bp) continue; + for (bp = cte; isblank((unsigned char)*bp); ++bp) continue; inform("\"%s/%s\" type in message %s must be encoded in\n" "7bit, 8bit, or binary, per RFC 2045 (6.4). "