Remove two pointless else branches
authorVolker Lendecke <vl@samba.org>
Sun, 30 Mar 2008 20:08:17 +0000 (22:08 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 14 Apr 2008 12:37:39 +0000 (14:37 +0200)
source/smbd/nttrans.c

index e8dae705b05b6b22469588ea8301f74aff69d32d..ae7bd8b7b722a095d565ccd13b621a1e4a8723a1 100644 (file)
@@ -498,11 +498,10 @@ void reply_ntcreate_and_X(struct smb_request *req)
                        do_ntcreate_pipe_open(conn, req);
                        END_PROFILE(SMBntcreateX);
                        return;
-               } else {
-                       reply_doserror(req, ERRDOS, ERRnoaccess);
-                       END_PROFILE(SMBntcreateX);
-                       return;
                }
+               reply_doserror(req, ERRDOS, ERRnoaccess);
+               END_PROFILE(SMBntcreateX);
+               return;
        }
 
        oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
@@ -871,10 +870,9 @@ static void call_nt_transact_create(connection_struct *conn,
                                ppparams, parameter_count,
                                ppdata, data_count);
                        return;
-               } else {
-                       reply_doserror(req, ERRDOS, ERRnoaccess);
-                       return;
                }
+               reply_doserror(req, ERRDOS, ERRnoaccess);
+               return;
        }
 
        /*