route: Fix compile warning with glibc
[project/relayd.git] / route.c
diff --git a/route.c b/route.c
index c552d1f271f56b9aef8f635beee33b1c2092c8da..602fdc9e1a9d498de5be3c2ca19aed78cd9644a5 100644 (file)
--- a/route.c
+++ b/route.c
@@ -36,13 +36,16 @@ int route_table = 16800;
 
 static void rtnl_flush(void)
 {
+       ssize_t ret;
        int fd;
 
        fd = open("/proc/sys/net/ipv4/route/flush", O_WRONLY);
        if (fd < 0)
                return;
 
-       write(fd, "-1", 2);
+       ret = write(fd, "-1", 2);
+       if (ret != 2)
+               perror("write");
        close(fd);
 }