X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c08cb60fe34b42b0a83bc88b57fd41b07793863f..e6a316e73b70ee428ec701a5df2bcf795d4b1802:/uip/new.c diff --git a/uip/new.c b/uip/new.c index a787806d..ae5f3765 100644 --- a/uip/new.c +++ b/uip/new.c @@ -14,8 +14,8 @@ #include #include #include -#include "../sbr/lock_file.h" -#include "../sbr/m_maildir.h" +#include "sbr/lock_file.h" +#include "sbr/m_maildir.h" #define NEW_SWITCHES \ X("mode", 1, MODESW) \ @@ -114,7 +114,7 @@ get_msgnums(char *folder, char *sequences[]) return NULL; /* get filename of sequence file */ - seqfile = concat(m_maildir(folder), "/", mh_seq, (void *)NULL); + seqfile = concat(m_maildir(folder), "/", mh_seq, NULL); if (seqfile == NULL) return NULL; @@ -150,7 +150,7 @@ get_msgnums(char *folder, char *sequences[]) } else { old_msgnums = msgnums; msgnums = concat(old_msgnums, " ", - this_msgnums, (void *)NULL); + this_msgnums, NULL); free(old_msgnums); free(this_msgnums); } @@ -165,7 +165,7 @@ get_msgnums(char *folder, char *sequences[]) } else { old_msgnums = msgnums; msgnums = concat(old_msgnums, " ", - this_msgnums, (void *)NULL); + this_msgnums, NULL); free(old_msgnums); free(this_msgnums); } @@ -370,10 +370,9 @@ doit(char *cur, char *folders, char *sequences[]) /* Found current folder in fprev mode; if we have a * previous node in the list, return it; else return * the last node. */ - if (prev == NULL) { - return last; - } - return prev; + if (prev) + return prev; + return last; } } else if (run_mode == RM_UNSEEN) { int status; @@ -395,7 +394,7 @@ doit(char *cur, char *folders, char *sequences[]) /* TODO: Split enough of scan.c out so that we can call it here. */ command = concat("scan +", node->n_name, " ", sequences_s, - (void *)NULL); + NULL); status = system(command); if (! WIFEXITED (status)) { adios (command, "system");