s3: Slightly simplify grant_fsp_oplock_type
authorVolker Lendecke <vl@samba.org>
Wed, 30 May 2012 09:28:19 +0000 (11:28 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 16 Jun 2012 04:07:55 +0000 (21:07 -0700)
The "else" is not necessary, we did a return in the if-branch

Signed-off-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 8fa28be096f036f68a99b99903b33f9c6b7359cf..26d6971a42016cb0fecae32046cb956f4281f232 100644 (file)
@@ -1283,7 +1283,9 @@ static void grant_fsp_oplock_type(files_struct *fsp,
                DEBUG(10,("grant_fsp_oplock_type: oplock type 0x%x on file %s\n",
                        fsp->oplock_type, fsp_str_dbg(fsp)));
                return;
-       } else if (lp_locking(fsp->conn->params) && file_has_brlocks(fsp)) {
+       }
+
+       if (lp_locking(fsp->conn->params) && file_has_brlocks(fsp)) {
                DEBUG(10,("grant_fsp_oplock_type: file %s has byte range locks\n",
                        fsp_str_dbg(fsp)));
                fsp->oplock_type = NO_OPLOCK;