X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/f09abae01503136d974a3a969cc2b8a6a6f83abe..9a252767b2fc48d8f6d2aaabdcb77a5ce1dbad00:/uip/rmf.c diff --git a/uip/rmf.c b/uip/rmf.c index 31774745..4684e7e0 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -8,6 +8,7 @@ */ #include +#include #define RMF_SWITCHES \ X("interactive", 0, INTRSW) \ @@ -123,7 +124,7 @@ main (int argc, char **argv) static int rmf (char *folder) { - int i, j, others; + int i, others; char *maildir; char cur[BUFSIZ]; struct dirent *dp; @@ -156,7 +157,6 @@ rmf (char *folder) (void)ext_hook("del-hook", maildir, NULL); - j = strlen(BACKUP_PREFIX); while ((dp = readdir (dd))) { switch (dp->d_name[0]) { case '.': @@ -171,7 +171,7 @@ rmf (char *folder) if (m_atoi (dp->d_name)) break; if (strcmp (dp->d_name, LINK) == 0 - || strncmp (dp->d_name, BACKUP_PREFIX, j) == 0) + || HasPrefix(dp->d_name, BACKUP_PREFIX)) break; admonish (NULL, "file \"%s/%s\" not deleted", @@ -216,7 +216,7 @@ rma (char *folder) char *cp; struct node *np, *pp; - alen = strlen ("atr-"); + alen = LEN("atr-"); plen = strlen (cp = m_mailpath (folder)) + 1; /*