1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

timesyncd: check return of setting IP_TOS

Fonud by Coverity. Fixes CID #1237534.
This commit is contained in:
Tom Gundersen 2014-09-18 23:37:07 +02:00
parent 25773e7fc5
commit 2f905e821e

View File

@ -721,7 +721,9 @@ static int manager_listen_setup(Manager *m) {
if (r < 0)
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);
}