Systemd/src/libsystemd-network
Lennart Poettering 03e334a1c7 util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:

        fd = safe_close(fd);

Which will close an fd if it is open, and reset the fd variable
correctly.

By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards.
2014-03-18 19:31:34 +01:00
..
dhcp-internal.h sd-dhcp: generalise ip header generation 2014-03-11 12:03:46 +01:00
dhcp-lease-internal.h sd-dhcp-lease: add sd_dhcp_lease_get_next_server() 2014-03-03 17:18:22 +01:00
dhcp-network.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
dhcp-option.c sd-network: add new library 2014-02-28 01:01:13 +01:00
dhcp-packet.c sd-dhcp: generalise ip header generation 2014-03-11 12:03:46 +01:00
dhcp-protocol.h sd-dhcp-lease: add Root Path support 2014-03-03 16:48:02 +01:00
ipv4ll-internal.h sd-network: IPv4 link-local support [v2] 2014-03-03 23:24:34 +01:00
ipv4ll-network.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
ipv4ll-packet.c sd-network: IPv4 link-local support [v2] 2014-03-03 23:24:34 +01:00
Makefile sd-network: add new library 2014-02-28 01:01:13 +01:00
sd-dhcp-client.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
sd-dhcp-lease.c networkd: fix creation of runtime dirs at startup 2014-03-14 12:44:17 +01:00
sd-ipv4ll.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
test-dhcp-client.c test-dhcp-client: remove pointless initializer, wrongly committed earlier 2014-03-12 01:26:34 +01:00
test-dhcp-option.c sd-network: add new library 2014-02-28 01:01:13 +01:00