From d1afc02c50d7632772a5bac80bcf087a35cde609 Mon Sep 17 00:00:00 2001 From: Michael Jung Date: Wed, 31 Jul 2019 07:18:07 -0600 Subject: [PATCH] fs/dirent/fs_opendir.c: Fix typo and style. opendir() did set errno to a negative value in one error case. Fixed some coding style issues found by nxstyle. --- fs/dirent/fs_opendir.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/dirent/fs_opendir.c b/fs/dirent/fs_opendir.c index 874b655a2b..eda6a4685e 100644 --- a/fs/dirent/fs_opendir.c +++ b/fs/dirent/fs_opendir.c @@ -88,7 +88,7 @@ static inline int open_mountpoint(FAR struct inode *inode, if (!inode->u.i_mops || !inode->u.i_mops->opendir) { - return ENOSYS; + return ENOSYS; } /* Take reference to the mountpoint inode. Note that we do not use @@ -138,7 +138,8 @@ static inline int open_mountpoint(FAR struct inode *inode, * ****************************************************************************/ -static void open_pseudodir(FAR struct inode *inode, FAR struct fs_dirent_s *dir) +static void open_pseudodir(FAR struct inode *inode, + FAR struct fs_dirent_s *dir) { /* We have a valid pseudo-filesystem node. Take two references on the * inode -- one for the parent (fd_root) and one for the child (fd_next). @@ -297,7 +298,7 @@ FAR DIR *opendir(FAR const char *path) if (*path != '/') { - ret = -ENOTDIR; + ret = ENOTDIR; goto errout_with_semaphore; } @@ -373,7 +374,7 @@ FAR DIR *opendir(FAR const char *path) ret = open_mountpoint(inode, relpath, dir); if (ret != OK) { - goto errout_with_direntry; + goto errout_with_direntry; } } #endif