summaryrefslogtreecommitdiffhomepage
path: root/src/dhcpv6-ia.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-28 18:12:21 +0100
committerSteven Barth <steven@midlink.org>2015-03-30 14:14:22 +0200
commit73a7133b6e42edc218da5b8011c580ed48c7731a (patch)
tree71bf65b4c602e14fd8c17ff2ff94db9d394c2b19 /src/dhcpv6-ia.c
parent3b4e6d19b7ce0953efcd6d1c545b031b73e0ab6e (diff)
properly handle return codes
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'src/dhcpv6-ia.c')
-rw-r--r--src/dhcpv6-ia.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index 7db4cee..74e3441 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -219,7 +219,7 @@ void dhcpv6_write_statefile(void)
return;
lockf(fd, F_LOCK, 0);
- ftruncate(fd, 0);
+ if (ftruncate(fd, 0) < 0) {}
FILE *fp = fdopen(fd, "w");
if (!fp) {