diff --git a/fs/inode/fs_inodefind.c b/fs/inode/fs_inodefind.c index 3ca898fd769..7534a3441d7 100644 --- a/fs/inode/fs_inodefind.c +++ b/fs/inode/fs_inodefind.c @@ -77,7 +77,7 @@ FAR struct inode *inode_find(FAR const char *path, FAR const char **relpath) { FAR struct inode *node; - if (!path || !*path || path[0] != '/') + if (path == NULL || path[0] == '\0' || path[0] != '/') { return NULL; } diff --git a/fs/inode/fs_inoderemove.c b/fs/inode/fs_inoderemove.c index 52e77dfcf92..c3fbd937352 100644 --- a/fs/inode/fs_inoderemove.c +++ b/fs/inode/fs_inoderemove.c @@ -88,7 +88,7 @@ FAR struct inode *inode_unlink(FAR const char *path) /* Verify parameters. Ignore null paths and relative paths */ - if (!path || *path == '\0' || path[0] != '/') + if (path == NULL || path[0] != '/') { return NULL; }