Re: errno oversight

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 08 2021, Han-Wen Nienhuys wrote:

> In refs.c in origin/next and origin/seen, we have the following fragment:

It's in "master".

>                    if (refs_read_raw_ref(refs, refname, oid, &sb_refname,
>                                       &read_flags, failure_errno)) {
>                         *flags |= read_flags;
>                         if (errno)
>                                 *failure_errno = errno;
>
> overwriting failure_errno looks like an oversight?

This is from my ef18119dec8 (refs API: add a version of
refs_resolve_ref_unsafe() with "errno", 2021-10-16).

I don't see the bug here, overwriting *failure_errno is the point of
that variable. We're keeping the right errno value right after a
failure, and passing it up to our caller.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux