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

Collin Funk via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <[email protected]>
Jacob Bachmeyer <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.