X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3b6170b27ba8fedbb4d67d2842bfaa38d4417962..ca2f8cc7e93a21f9f04e0d976ca97feac4802e91:/uip/flist.c diff --git a/uip/flist.c b/uip/flist.c index cd5682af..e3c84a43 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -15,6 +15,7 @@ #include #include +#include "h/done.h" #include "sbr/m_maildir.h" /* @@ -126,7 +127,7 @@ main(int argc, char **argv) /* allocate the initial space to record the folder names */ numfolders = 0; maxfolders = MAXFOLDERS; - foldersToDo = (char **) mh_xmalloc ((size_t) (maxfolders * sizeof(*foldersToDo))); + foldersToDo = mh_xmalloc ((size_t) (maxfolders * sizeof(*foldersToDo))); /* no sequences yet */ sequencesToDo = svector_create (0); @@ -202,7 +203,7 @@ main(int argc, char **argv) */ if (numfolders >= maxfolders) { maxfolders += MAXFOLDERS; - foldersToDo = (char **) mh_xrealloc (foldersToDo, + foldersToDo = mh_xrealloc (foldersToDo, (size_t) (maxfolders * sizeof(*foldersToDo))); } if (*cp == '+' || *cp == '@') { @@ -274,7 +275,7 @@ GetFolderOrder(void) AllocFolders(&orders, &nOrdersAlloced, nOrders + 1); o = &orders[nOrders++]; o->priority = priority++; - o->name = (char *) mh_xmalloc(p - s + 1); + o->name = mh_xmalloc(p - s + 1); strncpy(o->name, s, p - s); o->name[p - s] = 0; } else @@ -410,7 +411,7 @@ BuildFolderListRecurse(char *dirName, struct stat *s, int searchdepth) /* Check to see if the name of the file is a number * if it is, we assume it's a mail file and skip it */ - for (n = dp->d_name; *n && isdigit((unsigned char) *n); n++); + for (n = dp->d_name; isdigit((unsigned char)*n); n++); if (!*n) continue; strncpy (name, base, sizeof(name) - 2); @@ -614,10 +615,10 @@ AllocFolders(struct Folder **f, int *nfa, int n) return; if (*f == NULL) { *nfa = 10; - *f = (struct Folder *) mh_xmalloc (*nfa * (sizeof(struct Folder))); + *f = mh_xmalloc (*nfa * (sizeof(struct Folder))); } else { *nfa *= 2; - *f = (struct Folder *) mh_xrealloc (*f, *nfa * (sizeof(struct Folder))); + *f = mh_xrealloc (*f, *nfa * (sizeof(struct Folder))); } }