summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-09-13 11:42:03 -0400
committerSteve Dickson <steved@redhat.com>2022-09-13 13:34:49 -0400
commit896946e3c7f8ec1a02d4dc3a039e6cbbd2f611a9 (patch)
tree37e71261587761395fb86b286d3db7d81060c120
parentc134ddb785d64ab9c9bf150ed5ebf2609be8f871 (diff)
downloadnfs-utils-896946e3c7f8ec1a02d4dc3a039e6cbbd2f611a9.tar.gz
mountd: Check for return of stat function
simplify the check, stat() return 0 on success -1 on failure Fixes clang reported errors e.g. | v4clients.c:29:6: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses] | if (!stat("/proc/fs/nfsd/clients", &sb) == 0 || | ^ ~~ Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--support/export/v4clients.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/export/v4clients.c b/support/export/v4clients.c
index 5f15b61..3230251 100644
--- a/support/export/v4clients.c
+++ b/support/export/v4clients.c
@@ -26,7 +26,7 @@ void v4clients_init(void)
{
struct stat sb;
- if (!stat("/proc/fs/nfsd/clients", &sb) == 0 ||
+ if (stat("/proc/fs/nfsd/clients", &sb) != 0 ||
!S_ISDIR(sb.st_mode))
return;
if (clients_fd >= 0)