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

David Bremner david at tethera.net
Fri Sep 9 18:38:30 PDT 2016


Jani Nikula <jani at 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


More information about the notmuch mailing list