diff options
Diffstat (limited to 'builtin-mailinfo.c')
-rw-r--r-- | builtin-mailinfo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index cf5ef29c0f..f54e8752fb 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -545,10 +545,10 @@ static int decode_b_segment(char *in, char *ot, char *ep) return 0; } -static void convert_to_utf8(char *line, char *charset) +static void convert_to_utf8(char *line, const char *charset) { - static char latin_one[] = "latin1"; - char *input_charset = *charset ? charset : latin_one; + static const char latin_one[] = "latin1"; + const char *input_charset = *charset ? charset : latin_one; char *out = reencode_string(line, metainfo_charset, input_charset); if (!out) @@ -847,7 +847,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix) metainfo_charset = def_charset; else if (!strcmp(argv[1], "-n")) metainfo_charset = NULL; - else if (!strncmp(argv[1], "--encoding=", 11)) + else if (!prefixcmp(argv[1], "--encoding=")) metainfo_charset = argv[1] + 11; else usage(mailinfo_usage); |