Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 54ADC6DE1ADD for ; Tue, 7 Apr 2015 12:33:58 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.414 X-Spam-Level: X-Spam-Status: No, score=0.414 tagged_above=-999 required=5 tests=[AWL=0.404, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5jqJFsny7q-X for ; Tue, 7 Apr 2015 12:33:56 -0700 (PDT) Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net [87.98.215.224]) by arlo.cworth.org (Postfix) with ESMTPS id 8134C6DE1AFA for ; Tue, 7 Apr 2015 12:33:56 -0700 (PDT) Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim 4.80) (envelope-from ) id 1YfZEQ-0001yH-UG; Tue, 07 Apr 2015 19:32:18 +0000 Received: (nullmailer pid 16646 invoked by uid 1000); Tue, 07 Apr 2015 19:30:48 -0000 From: David Bremner To: Mark Walters , David Bremner , notmuch@notmuchmail.org Subject: [PATCH 1/4] cli: ignore config argument of notmuch_help_command Date: Wed, 8 Apr 2015 04:30:39 +0900 Message-Id: <1428435042-16503-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1428435042-16503-1-git-send-email-david@tethera.net> References: <871tjws8w8.fsf@qmul.ac.uk> <1428435042-16503-1-git-send-email-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 19:33:58 -0000 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notmuch.c b/notmuch.c index a5b2877..31672c3 100644 --- a/notmuch.c +++ b/notmuch.c @@ -177,7 +177,7 @@ exec_man (const char *page) } 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; @@ -202,14 +202,14 @@ notmuch_help_command (notmuch_config_t *config, int argc, char *argv[]) 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) { - char *page = talloc_asprintf (config, "notmuch-%s", topic->name); + char *page = talloc_asprintf (NULL, "notmuch-%s", topic->name); exec_man (page); } } -- 2.1.4