r20465: Get rid of a redundant !NT_STATUS_IS_OK(status)
authorVolker Lendecke <vlendec@samba.org>
Tue, 2 Jan 2007 11:16:27 +0000 (11:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:16:51 +0000 (12:16 -0500)
(This used to be commit ff173995cfeac216ab26faef6553be8f7f439347)

source3/smbd/nttrans.c

index 9061c75d337ac9d23dce8be3a833812bc215d728..5c96669987aa30cf91872b594ec454978949a580 100644 (file)
@@ -656,8 +656,8 @@ int reply_ntcreate_and_X(connection_struct *conn,
                status = can_delete(conn, fname, file_attributes, bad_path, True);
                /* We're only going to fail here if it's access denied, as that's the
                   only error we care about for "can we delete this ?" questions. */
-               if (!NT_STATUS_IS_OK(status) && (NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED) ||
-                                                NT_STATUS_EQUAL(status,NT_STATUS_CANNOT_DELETE))) {
+               if (NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED) ||
+                   NT_STATUS_EQUAL(status,NT_STATUS_CANNOT_DELETE)) {
                        restore_case_semantics(conn, file_attributes);
                        END_PROFILE(SMBntcreateX);
                        return ERROR_NT(NT_STATUS_ACCESS_DENIED);
@@ -1284,8 +1284,8 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o
                status = can_delete(conn, fname, file_attributes, bad_path, True);
                /* We're only going to fail here if it's access denied, as that's the
                   only error we care about for "can we delete this ?" questions. */
-               if (!NT_STATUS_IS_OK(status) && (NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED) ||
-                                                NT_STATUS_EQUAL(status,NT_STATUS_CANNOT_DELETE))) {
+               if (NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED) ||
+                   NT_STATUS_EQUAL(status,NT_STATUS_CANNOT_DELETE)) {
                        restore_case_semantics(conn, file_attributes);
                        return ERROR_NT(status);
                }