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 16CCB6DE1B4C for ; Sun, 5 Apr 2015 14:33:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.656 X-Spam-Level: X-Spam-Status: No, score=0.656 tagged_above=-999 required=5 tests=[AWL=0.646, 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 9M4LDGiL3dLz for ; Sun, 5 Apr 2015 14:33:39 -0700 (PDT) Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net [87.98.215.224]) by arlo.cworth.org (Postfix) with ESMTPS id 6AE506DE1B45 for ; Sun, 5 Apr 2015 14:33:39 -0700 (PDT) Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim 4.80) (envelope-from ) id 1YerfR-0002Rm-G9; Sun, 05 Apr 2015 21:01:17 +0000 Received: (nullmailer pid 29560 invoked by uid 1000); Sun, 05 Apr 2015 21:00:40 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 1/4] cli: ignore config argument of notmuch_help_command Date: Mon, 6 Apr 2015 05:59:31 +0900 Message-Id: <1428267574-28797-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1428267574-28797-1-git-send-email-david@tethera.net> References: <1428267574-28797-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: Sun, 05 Apr 2015 21:33:41 -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