Re: [PATCH v2 04/14] cli/reply: unify reply format functions

Subject: Re: [PATCH v2 04/14] cli/reply: unify reply format functions

Date: Fri, 09 Sep 2016 22:38:30 -0300

To: Jani Nikula, notmuch@notmuchmail.org

Cc:

From: David Bremner


Jani Nikula <jani@nikula.org> writes:

> Prepare for further future unification by making the code similar. The
> only functional change is that errors in mime_node_open() also break
> execution in default reply format.

>      GMimeMessage *reply;
> -    mime_node_t *root;
> +    mime_node_t *node;
> +
> +    if (mime_node_open (ctx, message, &params->crypto, &node))
> +	return 1;
>  
>      reply = create_reply_message (ctx, config, message, reply_all);
>      if (!reply)
>  	return 1;
>  
>      show_reply_headers (reply);
> +    format_part_reply (node);
>  
>      g_object_unref (G_OBJECT (reply));

I'm not sure if this matters in the long run, but a related change is
that the g_object_unref is skipped in case mime_node_open returns an
error.

d

Thread: