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];
const char *const new_params = concat (params, "\n", NULL);
replace_substring (&hf->value, semicolon_loc, new_params);
- free ((char *) new_params);
- free ((char *) params);
+ free((void *)new_params); /* Cast away const. Sigh. */
+ free((void *)params);
} else {
advise (NULL, "did not find semicolon in %s:%s\n",
hf->name, hf->value);