From: Ralph Corderoy Date: Fri, 21 Oct 2016 19:37:32 +0000 (+0100) Subject: Assume POSIX ctype.h; don't vet tolower()'s parameter. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/8c7b880eb8e42c3f51063aa3c3c2520b18777b53?hp=3f03b86d1f3dc643d2a88b816e889d291ddec5ea Assume POSIX ctype.h; don't vet tolower()'s parameter. --- diff --git a/uip/mhparse.c b/uip/mhparse.c index c380969c..4cff8b9a 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -660,8 +660,7 @@ get_ctinfo (char *cp, CT ct, int magic) /* down case the content type string */ for (dp = ci->ci_type; *dp; dp++) - if (isalpha((unsigned char) *dp) && isupper ((unsigned char) *dp)) - *dp = tolower ((unsigned char) *dp); + *dp = tolower ((unsigned char) *dp); while (isspace ((unsigned char) *cp)) cp++; @@ -699,8 +698,7 @@ get_ctinfo (char *cp, CT ct, int magic) /* down case the content subtype string */ for (dp = ci->ci_subtype; *dp; dp++) - if (isalpha((unsigned char) *dp) && isupper ((unsigned char) *dp)) - *dp = tolower ((unsigned char) *dp); + *dp = tolower ((unsigned char) *dp); magic_skip: while (isspace ((unsigned char) *cp)) @@ -3299,8 +3297,7 @@ parse_header_attrs (const char *filename, const char *fieldname, /* down case the attribute name */ for (dp = cp; istoken ((unsigned char) *dp); dp++) - if (isalpha((unsigned char) *dp) && isupper ((unsigned char) *dp)) - *dp = tolower ((unsigned char) *dp); + *dp = tolower ((unsigned char) *dp); for (up = dp; isspace ((unsigned char) *dp);) dp++;