]> diplodocus.org Git - nmh/commitdiff
Remove test for `\0' in `*s && isfoo(*s)' for ctype.h calls.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 10 Sep 2017 16:19:56 +0000 (17:19 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 10 Sep 2017 16:19:56 +0000 (17:19 +0100)
sbr/credentials.c
sbr/m_convert.c
uip/flist.c
uip/mhfixmsg.c
uip/mhparse.c

index 82e3c29..d3e8075 100644 (file)
@@ -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;
index 566b02a..c4e629c 100644 (file)
@@ -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 == ':') {
index cd5682a..f40f010 100644 (file)
@@ -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);
index 672d830..4e7f0e6 100644 (file)
@@ -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;
                 }
 
index 2e1beb9..ac8c1ce 100644 (file)
@@ -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).  "