p_clear should not be used with sizeof but *countof*
[apps/madmutt.git] / lib-lib / file.c
index 6442667..7809db3 100644 (file)
@@ -39,7 +39,6 @@
 #include "file.h"
 
 #include "../lib/debug.h"
-#include "../lib/str.h"
 
 #ifndef O_NOFOLLOW
 #  define O_NOFOLLOW  0
@@ -209,7 +208,7 @@ void mutt_unlink(const char *s)
             char buf[BUFSIZ];
             unlink(s);
 
-            p_clear(buf, sizeof(buf));
+            p_clear(buf, countof(buf));
             while (sb.st_size > 0) {
                 fwrite(buf, 1, MIN(ssizeof(buf), sb.st_size), f);
                 sb.st_size -= MIN(ssizeof(buf), sb.st_size);