use m_strdup and m_strlen that are inlined for efficiency
[apps/madmutt.git] / hook.c
diff --git a/hook.c b/hook.c
index 3eb5cd1..d6db820 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -12,6 +12,7 @@
 #endif
 
 #include <lib-lib/mem.h>
+#include <lib-lib/str.h>
 #include <lib-lib/macros.h>
 
 #include "mutt.h"
@@ -23,7 +24,6 @@
 #include "compress.h"
 #endif
 
-#include "lib/str.h"
 #include "lib/rx.h"
 
 #include <limits.h>
@@ -92,7 +92,7 @@ int mutt_parse_hook (BUFFER * buf, BUFFER * s, unsigned long data,
     _mutt_expand_path (path, sizeof (path), 1);
     p_delete(&pattern.data);
     memset (&pattern, 0, sizeof (pattern));
-    pattern.data = str_dup (path);
+    pattern.data = m_strdup(path);
   }
 #ifdef USE_COMPRESSED
   else if (data & (M_APPENDHOOK | M_OPENHOOK | M_CLOSEHOOK)) {
@@ -111,7 +111,7 @@ int mutt_parse_hook (BUFFER * buf, BUFFER * s, unsigned long data,
     mutt_check_simple (tmp, sizeof (tmp), DefaultHook);
     p_delete(&pattern.data);
     memset (&pattern, 0, sizeof (pattern));
-    pattern.data = str_dup (tmp);
+    pattern.data = m_strdup(tmp);
   }
 
   if (data & (M_MBOXHOOK | M_SAVEHOOK | M_FCCHOOK)) {
@@ -119,7 +119,7 @@ int mutt_parse_hook (BUFFER * buf, BUFFER * s, unsigned long data,
     mutt_expand_path (path, sizeof (path));
     p_delete(&command.data);
     memset (&command, 0, sizeof (command));
-    command.data = str_dup (path);
+    command.data = m_strdup(path);
   }
 
   /* check to make sure that a matching hook doesn't already exist */