summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-11 10:57:00 +0100
committerTom Gundersen <teg@jklm.no>2014-03-11 12:03:46 +0100
commit93570bd7ed31aad336c1a0a88ba08159c9c8e4cc (patch)
treecfdbfe291627d3ef4d36732160309aa32f035612 /src/libsystemd-network
parentf0c4cd7a2c2835a392b5b1807d8c506ab0af44de (diff)
sd-dhcp-client: use close_nointr_nofail()
We are already assuming the close() will not fail, so make it explicit.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index e0fce5b5ad..f4a83fb7a4 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -185,7 +185,7 @@ static int client_stop(sd_dhcp_client *client, int error) {
sd_event_source_unref(client->receive_message);
if (client->fd >= 0)
- close(client->fd);
+ close_nointr_nofail(client->fd);
client->fd = -1;
client->timeout_resend = sd_event_source_unref(client->timeout_resend);
@@ -546,7 +546,7 @@ static int client_timeout_t2(sd_event_source *s, uint64_t usec, void *userdata)
if (client->fd >= 0) {
client->receive_message =
sd_event_source_unref(client->receive_message);
- close(client->fd);
+ close_nointr_nofail(client->fd);
client->fd = -1;
}
@@ -848,7 +848,7 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
client->receive_message =
sd_event_source_unref(client->receive_message);
- close(client->fd);
+ close_nointr_nofail(client->fd);
client->fd = -1;
}