[PATCH Libgpg-error] argparse: Remove a duplicated condition.

Collin Funk collin.funk1 at gmail.com
Sun Jun 8 04:53:57 CEST 2025


Jacob Bachmeyer <jcb62281 at gmail.com> writes:

> On 6/7/25 16:30, Collin Funk via Gnupg-devel wrote:
>> * src/argparse.c (emulated_registry_lookup): Remove duplicated
>> condition.
>>
>> [...]
>>
>> -      if (!arg->internal->confname || !arg->internal->confname)
>> +      if (!arg->internal->confname)
>>           return NULL;  /* No system conf file known.  */
>
> Is there any possibility of arg->internal being NULL?
>
> Would "(!arg->internal || !arg->internal->confname)" be a better
> replacement?

Good questions. I did not consider that maybe that was the original
intention when writing this...

However, upon checking, this section of code is inside:

      if (!arg->internal->registry)
        {
          /* My changes are here.  */
          [...]
        }

So, if it were NULL we would already have problems. :)

Thanks,
Collin



More information about the Gnupg-devel mailing list