diff --git a/fsutils/ipcfg/ipcfg.c b/fsutils/ipcfg/ipcfg.c index d1f00b3f4..ae73608ed 100644 --- a/fsutils/ipcfg/ipcfg.c +++ b/fsutils/ipcfg/ipcfg.c @@ -26,6 +26,7 @@ #include #include +#include #include #include "fsutils/ipcfg.h" diff --git a/fsutils/ipcfg/ipcfg_binary.c b/fsutils/ipcfg/ipcfg_binary.c index 8d4dc2b44..85baae3e0 100644 --- a/fsutils/ipcfg/ipcfg_binary.c +++ b/fsutils/ipcfg/ipcfg_binary.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "fsutils/ipcfg.h" @@ -384,7 +385,7 @@ int ipcfg_write_binary_ipv4(FAR const char *path, int fd; int ret; - DEBUGASSERT(fd >= 0 && ipv4cfg != NULL); + DEBUGASSERT(ipv4cfg != NULL); #ifdef CONFIG_NET_IPv6 /* Read any IPv6 data in the file */ @@ -410,6 +411,7 @@ int ipcfg_write_binary_ipv4(FAR const char *path, /* Open the file for writing (truncates) */ fd = ipcfg_open(path, O_WRONLY | O_TRUNC | O_CREAT, 0666); + DEBUGASSERT(fd >= 0); if (fd < 0) { return fd; diff --git a/fsutils/ipcfg/ipcfg_text.c b/fsutils/ipcfg/ipcfg_text.c index ef89047f3..ab9f9d0da 100644 --- a/fsutils/ipcfg/ipcfg_text.c +++ b/fsutils/ipcfg/ipcfg_text.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include