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

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Oct 9 20:33:54 PDT 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171009/b563195f/attachment-0001.sig>


More information about the notmuch mailing list