Skip to content

Commit

Permalink
logind: fd 0 is a valid fd
Browse files Browse the repository at this point in the history
(cherry picked from commit 4c9cb12)
  • Loading branch information
poettering authored and fbuihuu committed Feb 6, 2019
1 parent 0654612 commit d16ea1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libsystemd-network/sd-dhcp-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ static int dhcp_server_send_udp(sd_dhcp_server *server, be32_t destination,
int r;

assert(server);
assert(server->fd > 0);
assert(server->fd >= 0);
assert(message);
assert(len > sizeof(DHCPMessage));

Expand Down
2 changes: 1 addition & 1 deletion src/login/logind-session-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ int session_device_save(SessionDevice *sd) {
}

void session_device_attach_fd(SessionDevice *sd, int fd, bool active) {
assert(fd > 0);
assert(fd >= 0);
assert(sd);
assert(sd->fd < 0);
assert(!sd->active);
Expand Down

0 comments on commit d16ea1c

Please sign in to comment.