Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CD6E0431FD0 for ; Thu, 24 Nov 2011 13:20:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o9y7HBq77rHq for ; Thu, 24 Nov 2011 13:20:41 -0800 (PST) Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id AECA6431FB6 for ; Thu, 24 Nov 2011 13:20:40 -0800 (PST) Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAOLKSbl009571; Thu, 24 Nov 2011 23:20:28 +0200 From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] CLI: update call to notmuch_help_command for new calling conventions. In-Reply-To: <1322164961-18523-1-git-send-email-david@tethera.net> References: <1322164961-18523-1-git-send-email-david@tethera.net> User-Agent: Notmuch/0.10+15~gb5803e9 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Bremner X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Thu, 24 Nov 2011 21:20:41 -0000 On Thu, 24 Nov 2011 16:02:41 -0400, David Bremner wrote: > From: David Bremner > > When I changed the calling convention to pass in all but the zero-th > argument to subcommands, I missed this one call, resulting in a > segmentation fault. LGTM, is analogous to other 'argc -1, &argv[1]' uses and seems to work on top of notmuch 0.10+21~gae7814b Tomi > --- > notmuch.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/notmuch.c b/notmuch.c > index 77973f8..d44ce9a 100644 > --- a/notmuch.c > +++ b/notmuch.c > @@ -621,7 +621,7 @@ main (int argc, char *argv[]) > return notmuch (local); > > if (STRNCMP_LITERAL (argv[1], "--help") == 0) > - return notmuch_help_command (NULL, 0, NULL); > + return notmuch_help_command (NULL, argc - 1, &argv[1]); > > if (STRNCMP_LITERAL (argv[1], "--version") == 0) { > printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n"); > -- > 1.7.5.4 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch >