]> diplodocus.org Git - nmh/commitdiff
Use HasPrefix() instead of strncmp().
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 23 Oct 2016 22:20:45 +0000 (23:20 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 24 Oct 2016 09:18:56 +0000 (10:18 +0100)
uip/mhfixmsg.c

index ee25624..0c5c2ce 100644 (file)
@@ -2526,7 +2526,7 @@ fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
     int fixed = 0;
 
     if (((value_len = strlen (value)) > 0)  &&
-        strncmp (value, "=?", 2) == 0  &&
+        HasPrefix(value, "=?") &&
         strncmp (&value[value_len - 2], "?=", 2) == 0) {
         /* Looks like an RFC 2047 encoded parameter. */
         char decoded[PATH_MAX + 1];