diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index bd3d705a641..b2ad1050814 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -271,8 +271,7 @@ struct tevent_req *cli_smb2_create_fnum_send( &state->in_cblobs, SMB2_CREATE_TAG_TWRP, twrp_blob); - if (!NT_STATUS_IS_OK(status)) { - tevent_req_nterror(req, status); + if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } } diff --git a/source3/libsmb/clioplock.c b/source3/libsmb/clioplock.c index 01c98f1c302..fcef01f8d83 100644 --- a/source3/libsmb/clioplock.c +++ b/source3/libsmb/clioplock.c @@ -85,8 +85,7 @@ static void cli_smb_oplock_break_waiter_done(struct tevent_req *subreq) NULL, /* pinbuf */ NULL, 0); /* expected */ TALLOC_FREE(subreq); - if (!NT_STATUS_IS_OK(status)) { - tevent_req_nterror(req, status); + if (tevent_req_nterror(req, status)) { return; } if (wct < 8) {