fsutils/ipcfg: Add assert header

This commit is contained in:
David Sidrane 2021-06-08 09:12:40 -07:00 committed by Xiang Xiao
parent f99a4f557d
commit 3f2db83898
3 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <debug.h>
#include "fsutils/ipcfg.h"

View File

@ -28,6 +28,7 @@
#include <stdbool.h>
#include <unistd.h>
#include <fcntl.h>
#include <assert.h>
#include <debug.h>
#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;

View File

@ -28,6 +28,7 @@
#include <stdbool.h>
#include <unistd.h>
#include <ctype.h>
#include <assert.h>
#include <debug.h>
#include <arpa/inet.h>