p_clear should not be used with sizeof but *countof*
[apps/madmutt.git] / alias.c
diff --git a/alias.c b/alias.c
index f0f129d..028f9ba 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -405,7 +405,7 @@ int mutt_alias_complete (char *s, size_t buflen)
 #define min(a,b)        ((a<b)?a:b)
 
   if (s[0] != 0) {              /* avoid empty string as strstr argument */
-    p_clear(bestname, sizeof(bestname));
+    p_clear(bestname, countof(bestname));
 
     while (a) {
       if (a->name && strstr (a->name, s) == a->name) {