[PATCH 1/3] cli: refactor "notmuch tag" data structures for tagging operations

David Bremner david at tethera.net
Sat Mar 24 11:58:43 PDT 2012


On Sat, 24 Mar 2012 18:14:35 +0200, Jani Nikula <jani at nikula.org> wrote:
> +	if (argv[i][0] == '+' || argv[i][0] == '-') {
> +	    tag_ops[tag_ops_count++] = (tag_operation_t) {
> +		.tag = argv[i] + 1,
> +		.remove = argv[i][0] == '-',
> +	    };

I'm not sure if this is a worthwhile use of a C99. Wouldn't it be
simpler to just use two assignments? and maybe increment the index
after? Still 3 lines of code.

Other than that, this patch looked ok to me.  I think it probably
deserves a NEWS patch that the ordering behaviour changed. I do think
the new order is more sensible, and the old one was never documented.


d


More information about the notmuch mailing list