[PATCH 1/2] elf: inline lose for error handling
Florian Weimer
fweimer@redhat.com
Tue Dec 15 10:41:15 GMT 2020
* Szabolcs Nagy via Libc-alpha:
> The 12/14/2020 15:07, Adhemerval Zanella via Libc-alpha wrote:
>> On 11/12/2020 13:35, Szabolcs Nagy via Libc-alpha wrote:
>> > + lose:
>> > + /* The file might already be closed. */
>> > + if (fd != -1)
>> > + (void) __close_nocancel (fd);
>>
>> I think you can remove the (void) cast here.
>
> hm yes i will remove that void. there seem to be
>
> __close_nocancel
>
> and
>
> __close_nocancel_nostatus
>
> as well with the only diffeence that the latter has void return.
>
> i think this can be cleaned up to only use __close_nocancel.
Or more precisely, remove the errno clobber from __close_nocancel and
__close_nocancel_nostatus. Currently, the implementation does not match
its documented behavior.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
More information about the Libc-alpha
mailing list