Re: [PATCH v2 02/10] crypto: make shared crypto code behave library-like

Subject: Re: [PATCH v2 02/10] crypto: make shared crypto code behave library-like

Date: Mon, 09 Oct 2017 23:33:54 -0400

To: Jani Nikula, Notmuch Mail

Cc:

From: Daniel Kahn Gillmor


On Sat 2017-09-23 18:36:18 +0300, Jani Nikula wrote:
>>  	if (!cryptoctx)
>>  	    return NULL;
>
> I guess this will work because we initialize cryptoctx to NULL, but if
> we return the status, I think we should trust status == success means
> cryptoctx is fine, and otherwise we shouldn't touch or look at
> cryptoctx.

this function (_mime_node_create) is *not* returning the status -- it's
returning the mime node.

a non-successful status might or might not mean that the cryptoctx is
set up.  so i could move this check within the "if (status)" if you
prefer, but if we're going to do the check here, i don't see why we
wouldn't just do it regardless of status.

at any rate, this is all within the gmime 2.6 variant, and we'll be able
to clean it out once we move to gmime 3.0.

so i've left this part as-is, while having addressed the rest of your
feedback.

thanks for the review!

       --dkg
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: