Copyright updates:
[exim.git] / src / src / rfc2047.c
index f7085007a8df5ecf10b7fde81b4c8b86bc9124fd..6c461029b136d1f9e0ea6ab036bb85032612e9e6 100644 (file)
@@ -3,6 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* This file contains a function for decoding message header lines that may
@@ -233,17 +234,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