From: Christof Schmitt Date: Mon, 6 Jan 2020 21:40:07 +0000 (-0700) Subject: vfs_gpfs: Use early return in sharemode function X-Git-Tag: ldb-2.1.0~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a64978e0dc006b9b14541c60379d61e170355468;p=thirdparty%2Fsamba.git vfs_gpfs: Use early return in sharemode function This removes one level of indentation. Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 18ab3be37e8..632c8ad044d 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -131,11 +131,12 @@ static int set_gpfs_sharemode(files_struct *fsp, uint32_t access_mask, "deny=0x%x\n", access_mask, allow, share_access, deny); result = gpfswrap_set_share(fsp->fh->fd, allow, deny); - if (result != 0) { - DEBUG(10, ("gpfs_set_share failed: %s\n", - strerror(errno))); + if (result == 0) { + return 0; } + DEBUG(10, ("gpfs_set_share failed: %s\n", strerror(errno))); + return result; }