From 8c7b880eb8e42c3f51063aa3c3c2520b18777b53 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Fri, 21 Oct 2016 20:37:32 +0100 Subject: [PATCH] Assume POSIX ctype.h; don't vet tolower()'s parameter. --- uip/mhparse.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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++; -- 2.56.0