From f753d3320b8bf62785c3545c5bbd93185764f288 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 11 Jun 2015 07:47:26 -0600 Subject: [PATCH] Trivial cleanup of some parameter sanity checks --- fs/inode/fs_inodefind.c | 2 +- fs/inode/fs_inoderemove.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }