]> granicus.if.org Git - neomutt/commitdiff
Clean up the strcat cleanup
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 13 Mar 2007 09:58:34 +0000 (10:58 +0100)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 13 Mar 2007 09:58:34 +0000 (10:58 +0100)
charset.c

index 8d483c97c3d7e3653b0849b71bd3668dca7dde26..7cb9da51ce309500e76dd4816b12046485de78dd 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -245,9 +245,10 @@ void mutt_canonical_charset (char *dest, size_t dlen, const char *name)
   char *p;
   char scratch[LONG_STRING];
 
-  if (!ascii_strcasecmp (name, "utf-8")) {
-    strfcpy (dest, name, dlen);
-    goto found_utf8;
+  if (!ascii_strcasecmp (name, "utf-8")) 
+  {
+    strfcpy (dest, "utf-8", dlen);
+    return;
   }
 
   /* catch some common iso-8859-something misspellings */
@@ -272,7 +273,6 @@ void mutt_canonical_charset (char *dest, size_t dlen, const char *name)
 
   strfcpy (dest, scratch, dlen);
 
-found_utf8:
   /* for cosmetics' sake, transform to lowercase. */
   for (p = dest; *p; p++)
     *p = ascii_tolower (*p);