mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22:03:43 +03:00
timesyncd: check return of setting IP_TOS
Fonud by Coverity. Fixes CID #1237534.
This commit is contained in:
parent
25773e7fc5
commit
2f905e821e
@ -721,7 +721,9 @@ static int manager_listen_setup(Manager *m) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
setsockopt(m->server_socket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
|
r = setsockopt(m->server_socket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
|
||||||
|
if (r < 0)
|
||||||
|
return -errno;
|
||||||
|
|
||||||
return sd_event_add_io(m->event, &m->event_receive, m->server_socket, EPOLLIN, manager_receive_response, m);
|
return sd_event_add_io(m->event, &m->event_receive, m->server_socket, EPOLLIN, manager_receive_response, m);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user