From: David Bremner Date: Mon, 6 Apr 2015 12:22:35 +0000 (+0900) Subject: [Patch v2 1/4] cli: ignore config argument of notmuch_help_command X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5dd9543bd673c23379c74aad9962aefe8f43cca1;p=notmuch-archives.git [Patch v2 1/4] cli: ignore config argument of notmuch_help_command --- diff --git a/d5/b7a8bc6b37df3af9dec676e72e5ae1ed9c97b0 b/d5/b7a8bc6b37df3af9dec676e72e5ae1ed9c97b0 new file mode 100644 index 000000000..e919781e3 --- /dev/null +++ b/d5/b7a8bc6b37df3af9dec676e72e5ae1ed9c97b0 @@ -0,0 +1,88 @@ +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 3045A6DE1AEA + for ; Mon, 6 Apr 2015 05:24:29 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.467 +X-Spam-Level: +X-Spam-Status: No, score=0.467 tagged_above=-999 required=5 tests=[AWL=0.457, + 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 ZplKL_UUhihJ for ; + Mon, 6 Apr 2015 05:24:27 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id 3B7EE6DE1AC6 + for ; Mon, 6 Apr 2015 05:24:27 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1Yf649-000593-8c; Mon, 06 Apr 2015 12:23:45 +0000 +Received: (nullmailer pid 3280 invoked by uid 1000); Mon, 06 Apr 2015 + 12:22:58 -0000 +From: David Bremner +To: David Bremner , notmuch@notmuchmail.org +Subject: [Patch v2 1/4] cli: ignore config argument of notmuch_help_command +Date: Mon, 6 Apr 2015 21:22:35 +0900 +Message-Id: <1428322958-2887-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1428322958-2887-1-git-send-email-david@tethera.net> +References: <87d23ixnr7.fsf@maritornes.cs.unb.ca> + <1428322958-2887-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: Mon, 06 Apr 2015 12:24:29 -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 +