]> diplodocus.org Git - nmh/blobdiff - uip/new.c
nmh_completion(): Simplify, removing local variable.
[nmh] / uip / new.c
index 137f2bcbc4514668d6c2c0f3990442e0d83ae586..88d66ba1bd06a69ac0252cabd7de7c1fb6c2c629 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -14,8 +14,8 @@
 #include <h/mh.h>
 #include <h/crawl_folders.h>
 #include <h/utils.h>
-#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) \
@@ -75,7 +75,7 @@ count_messages(char *field)
     return total;
 }
 
-/* Return TRUE if the sequence 'name' is in 'sequences'. */
+/* Return true if the sequence 'name' is in 'sequences'. */
 static bool
 seq_in_list(char *name, char *sequences[])
 {
@@ -83,11 +83,11 @@ seq_in_list(char *name, char *sequences[])
 
     for (i = 0; sequences[i] != NULL; i++) {
        if (strcmp(name, sequences[i]) == 0) {
-           return TRUE;
+           return true;
        }
     }
 
-    return FALSE;
+    return false;
 }
 
 /* Return the string list of message numbers from the sequences file, or NULL
@@ -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);
                        }
@@ -229,7 +229,7 @@ static bool
 crawl_callback(char *folder, void *baton)
 {
     check_folder(folder, strlen(folder), baton);
-    return TRUE;
+    return true;
 }
 
 /* Scan folders, returning:
@@ -395,7 +395,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");