summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs/fs_open.c')
-rw-r--r--nuttx/fs/fs_open.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/fs/fs_open.c b/nuttx/fs/fs_open.c
index 5b318b702..aead99f8f 100644
--- a/nuttx/fs/fs_open.c
+++ b/nuttx/fs/fs_open.c
@@ -38,14 +38,18 @@
****************************************************************************/
#include <nuttx/config.h>
+
#include <sys/types.h>
#include <fcntl.h>
#include <sched.h>
#include <errno.h>
+#include <assert.h>
#ifdef CONFIG_FILE_MODE
#include <stdarg.h>
#endif
+
#include <nuttx/fs/fs.h>
+
#include "fs_internal.h"
/****************************************************************************
@@ -99,11 +103,7 @@ int open(const char *path, int oflags, ...)
/* Get the thread-specific file list */
list = sched_getfiles();
- if (!list)
- {
- ret = EMFILE;
- goto errout;
- }
+ DEBUGASSERT(list);
#ifdef CONFIG_FILE_MODE
# ifdef CONFIG_CPP_HAVE_WARNING