finish the "read" of charset.c
[apps/madmutt.git] / hook.c
diff --git a/hook.c b/hook.c
index aaf1c7c..aa0d478 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -412,30 +412,29 @@ void mutt_select_fcc (char *path, ssize_t pathlen, HEADER * hdr)
   mutt_pretty_mailbox (path);
 }
 
-static char *_mutt_string_hook (const char *match, int hook)
+static const char *_mutt_string_hook (const char *match, int hook)
 {
   HOOK *tmp = Hooks;
 
   for (; tmp; tmp = tmp->next) {
-    if ((tmp->type & hook) && ((match &&
-                                regexec (tmp->rx.rx, match, 0, NULL,
-                                         0) == 0) ^ tmp->rx.not))
+    if ((tmp->type & hook)
+    && ((match && regexec(tmp->rx.rx, match, 0, NULL, 0) == 0) ^ tmp->rx.not))
       return (tmp->command);
   }
   return (NULL);
 }
 
-char *mutt_charset_hook (const char *chs)
+const char *mutt_charset_hook (const char *chs)
 {
   return _mutt_string_hook (chs, M_CHARSETHOOK);
 }
 
-char *mutt_iconv_hook (const char *chs)
+const char *mutt_iconv_hook (const char *chs)
 {
   return _mutt_string_hook (chs, M_ICONVHOOK);
 }
 
-char *mutt_crypt_hook (address_t * adr)
+const char *mutt_crypt_hook (address_t * adr)
 {
   return _mutt_string_hook (adr->mailbox, M_CRYPTHOOK);
 }