diff options
author | John Crispin <blogic@openwrt.org> | 2015-03-28 18:12:21 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-03-30 14:14:22 +0200 |
commit | 73a7133b6e42edc218da5b8011c580ed48c7731a (patch) | |
tree | 71bf65b4c602e14fd8c17ff2ff94db9d394c2b19 /src/ndp.c | |
parent | 3b4e6d19b7ce0953efcd6d1c545b031b73e0ab6e (diff) |
properly handle return codes
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'src/ndp.c')
-rw-r--r-- | src/ndp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -132,7 +132,7 @@ int setup_ndp_interface(struct interface *iface, bool enable) iface->ndp_event.uloop.fd = -1; if (!enable || iface->ndp != RELAYD_RELAY) - write(procfd, "0\n", 2); + if (write(procfd, "0\n", 2) < 0) {} dump_neigh = true; } @@ -152,7 +152,7 @@ int setup_ndp_interface(struct interface *iface, bool enable) } if (enable && iface->ndp == RELAYD_RELAY) { - write(procfd, "1\n", 2); + if (write(procfd, "1\n", 2) < 0) {} close(procfd); int sock = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC, htons(ETH_P_IPV6)); |