From: Kevin McCarthy Date: Sat, 22 Jun 2019 19:54:40 +0000 (-0700) Subject: Remove unnecessary strcmp for mutt_view_attachment(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03f6a9cbc825a43f2de96dde2f4556cdf98c0b4d;p=mutt Remove unnecessary strcmp for mutt_view_attachment(). mutt_rfc1524_expand_filename() runs the result through mutt_adv_mktemp(), which will sanitize and relocate the filename under $tmpdir. The strcmp() is unneeded and distracting to the program logic; none of the other routines perform or need this check. --- diff --git a/attach.c b/attach.c index 04a5610b..552a1767 100644 --- a/attach.c +++ b/attach.c @@ -415,7 +415,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr, if (mutt_rfc1524_expand_filename (entry->nametemplate, fname, tempfile)) { - if (fp == NULL && mutt_strcmp(mutt_b2s (tempfile), a->filename)) + if (fp == NULL) { /* send case: the file is already there */ if (safe_symlink (a->filename, mutt_b2s (tempfile)) == -1)