]> git.notmuchmail.org Git - notmuch/commitdiff
cli: ignore config argument of notmuch_help_command
authorDavid Bremner <david@tethera.net>
Sun, 5 Apr 2015 13:24:42 +0000 (22:24 +0900)
committerDavid Bremner <david@tethera.net>
Mon, 1 Jun 2015 05:32:54 +0000 (07:32 +0200)
We call it with NULL at one point anyway, so it needs to work with
NULL. Since the only place we use talloc is right before exec, there
is no harm in always using NULL.

notmuch.c

index e5c2aeb383c23fa404e1034308435e2d0129f7ec..f81922ed090dcb12d27d3cda434e2493f60393c7 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -177,7 +177,7 @@ exec_man (const char *page)
 }
 
 static int
 }
 
 static int
-notmuch_help_command (notmuch_config_t *config, int argc, char *argv[])
+notmuch_help_command (unused (notmuch_config_t * config), int argc, char *argv[])
 {
     command_t *command;
     help_topic_t *topic;
 {
     command_t *command;
     help_topic_t *topic;
@@ -202,14 +202,14 @@ notmuch_help_command (notmuch_config_t *config, int argc, char *argv[])
 
     command = find_command (argv[0]);
     if (command) {
 
     command = find_command (argv[0]);
     if (command) {
-       char *page = talloc_asprintf (config, "notmuch-%s", command->name);
+       char *page = talloc_asprintf (NULL, "notmuch-%s", command->name);
        exec_man (page);
     }
 
     for (i = 0; i < ARRAY_SIZE (help_topics); i++) {
        topic = &help_topics[i];
        if (strcmp (argv[0], topic->name) == 0) {
        exec_man (page);
     }
 
     for (i = 0; i < ARRAY_SIZE (help_topics); i++) {
        topic = &help_topics[i];
        if (strcmp (argv[0], topic->name) == 0) {
-           char *page = talloc_asprintf (config, "notmuch-%s", topic->name);
+           char *page = talloc_asprintf (NULL, "notmuch-%s", topic->name);
            exec_man (page);
        }
     }
            exec_man (page);
        }
     }