torture3: Use tevent_req_nterror properly
authorVolker Lendecke <vl@samba.org>
Fri, 15 Nov 2013 13:17:21 +0000 (13:17 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 19 Nov 2013 03:05:08 +0000 (04:05 +0100)
Might be minor, but the less example of wrong API use we have the better
it is.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 19 04:05:08 CET 2013 on sn-devel-104

source3/torture/torture.c

index 8313cf141bf35cdefd0bdf0d51176057b38778f6..573e3f8110291832f2a6cc0e654466f5376d6d3a 100644 (file)
@@ -6754,10 +6754,9 @@ static void torture_createdel_created(struct tevent_req *subreq)
 
        status = cli_ntcreate_recv(subreq, &fnum);
        TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
+       if (tevent_req_nterror(req, status)) {
                DEBUG(10, ("cli_ntcreate_recv returned %s\n",
                           nt_errstr(status)));
-               tevent_req_nterror(req, status);
                return;
        }
 
@@ -6775,9 +6774,8 @@ static void torture_createdel_closed(struct tevent_req *subreq)
        NTSTATUS status;
 
        status = cli_close_recv(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
+       if (tevent_req_nterror(req, status)) {
                DEBUG(10, ("cli_close_recv returned %s\n", nt_errstr(status)));
-               tevent_req_nterror(req, status);
                return;
        }
        tevent_req_done(req);