[systemd-devel] [PATCH 12/24] sd-dhcp6-client: Add DHCPv6 Solicit message creation and sending

Filipe Brandenburger filbranden at google.com
Wed Jun 18 07:05:35 PDT 2014


On Wed, Jun 18, 2014 at 6:58 AM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
>> +        if (client->fd > 0)
>> +                safe_close(client->fd);
>> +        client->fd = -1;
> client->fd = safe_close(client->fd);
>
> That's what safe_close is for :)

And shouldn't the check be for client->fd >= 0? Zero is a valid file descriptor.

Cheers,
Filipe


More information about the systemd-devel mailing list