[PATCH v3 04/16] Provide _notmuch_crypto_{set,get}_gpg_path

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Feb 10 08:31:56 PST 2016


On Wed 2016-02-10 06:45:47 -0500, David Bremner wrote:
> Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
>
>> +#define try_gpg_path(z) if (test_for_executable(z)) return z
>> +    try_gpg_path("gpg2");
>> +    try_gpg_path("gpg");
>> +#undef try_gpg_path
>> +    return NULL;
>> +}
>
> I think I'd prefer just inlining these two ifs.
>
>> +notmuch_status_t
>> +_notmuch_crypto_set_gpg_path (_notmuch_crypto_t *crypto, const char* gpg_path)
>> +{
>> +    /* return success if this matches what is already configured */
>> +    if ((!gpg_path && !crypto->gpg_path) ||
>> +	(gpg_path && crypto->gpg_path && 0 == strcmp(gpg_path, crypto->gpg_path)))
>> +	return NOTMUCH_STATUS_SUCCESS;
>
> these changes probably need a pass of uncrustify or equivalent.

I've made these changes in my working copy; i'll publish them as part of
v4 soon.

   --dkg


More information about the notmuch mailing list