mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-10 00:58:20 +03:00
dhcp-server: don't assign sendmsg() return value to "int"
The type is "ssize_t", not "int", let's be accurate about that, as these types are different on some archs. Given that we don't actually care about the return value reall, drop the whole assignment, just check if negative.
This commit is contained in:
parent
37cbc1d579
commit
0f01c1f918
@ -313,7 +313,6 @@ static int dhcp_server_send_udp(sd_dhcp_server *server, be32_t destination,
|
||||
};
|
||||
struct cmsghdr *cmsg;
|
||||
struct in_pktinfo *pktinfo;
|
||||
int r;
|
||||
|
||||
assert(server);
|
||||
assert(server->fd >= 0);
|
||||
@ -337,8 +336,7 @@ static int dhcp_server_send_udp(sd_dhcp_server *server, be32_t destination,
|
||||
pktinfo->ipi_ifindex = server->ifindex;
|
||||
pktinfo->ipi_spec_dst.s_addr = server->address;
|
||||
|
||||
r = sendmsg(server->fd, &msg, 0);
|
||||
if (r < 0)
|
||||
if (sendmsg(server->fd, &msg, 0) < 0)
|
||||
return -errno;
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user