]> diplodocus.org Git - nmh/blobdiff - uip/mhfixmsg.c
test-nocreate: Don't use run_test and run_prog together.
[nmh] / uip / mhfixmsg.c
index ee25624c8ee13ea51edf2ddc237fcc624c576b9b..e9584593e24c03f00c85622793f4ecbe579ab9d9 100644 (file)
@@ -2522,12 +2522,9 @@ fix_always (CT ct, int *message_mods) {
  */
 static int
 fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
-    size_t value_len;
     int fixed = 0;
 
-    if (((value_len = strlen (value)) > 0)  &&
-        strncmp (value, "=?", 2) == 0  &&
-        strncmp (&value[value_len - 2], "?=", 2) == 0) {
+    if (HasPrefix(value, "=?") && HasSuffix(value, "?=")) {
         /* Looks like an RFC 2047 encoded parameter. */
         char decoded[PATH_MAX + 1];