Re: [PATCH v5 07/12] insert: add --folder option

Subject: Re: [PATCH v5 07/12] insert: add --folder option

Date: Sun, 28 Apr 2013 12:00:38 +1000

To: Jani Nikula

Cc: notmuch@notmuchmail.org

From: Peter Wang


On Sun, 28 Apr 2013 00:32:47 +0300, Jani Nikula <jani@nikula.org> wrote:
> > +    notmuch_opt_desc_t options[] = {
> > +	{ NOTMUCH_OPT_STRING, &folder, "folder", 0, 0 },
> > +	{ NOTMUCH_OPT_END, 0, 0, 0, 0 }
> > +    };
> > +
> > +    opt_index = parse_arguments (argc, argv, options, 1);
> > +
> > +    if (opt_index < 0) {
> > +	fprintf (stderr, "Error: bad argument to notmuch insert: %s\n",
> > +		 argv[-opt_index]);
> 
> I'm too tired to check what's correct, but argv[-opt_index] isn't.

Nice catch.  I'll just delete that message as parse_arguments
already prints a message, like other callers.

Peter

Thread: