X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Frfc2047.c;h=039c8493e54a42f07c28c70129dcb154c519ffd1;hb=4b01271fa595a08e68ba8c58d6404e83623aa9c8;hp=f7085007a8df5ecf10b7fde81b4c8b86bc9124fd;hpb=f3ebb786e451da973560f1c9d8cdb151d25108b5;p=exim.git diff --git a/src/src/rfc2047.c b/src/src/rfc2047.c index f7085007a..039c8493e 100644 --- a/src/src/rfc2047.c +++ b/src/src/rfc2047.c @@ -233,17 +233,11 @@ while (mimeword) #if HAVE_ICONV *q1 = 0; - if (target != NULL && strcmpic(target, mimeword+2) != 0) - { - icd = iconv_open(CS target, CS(mimeword+2)); - - if (icd == (iconv_t)(-1)) - { + if (target && strcmpic(target, mimeword+2) != 0) + if ((icd = iconv_open(CS target, CS(mimeword+2))) == (iconv_t)-1) *error = string_sprintf("iconv_open(\"%s\", \"%s\") failed: %s%s", target, mimeword+2, strerror(errno), (errno == EINVAL)? " (maybe unsupported conversion)" : ""); - } - } *q1 = '?'; #endif