properly handle return codes
[project/odhcpd.git] / src / dhcpv6-ia.c
index 7db4cee..74e3441 100644 (file)
@@ -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) {