[PATCH] torture3: Use tevent_req_nterror properly

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Nov 18 08:34:01 MST 2013


Hi!

Please review & push!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From b07eae53dd90225b08897d22c9a69933bf8ed405 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 15 Nov 2013 13:17:21 +0000
Subject: [PATCH] torture3: Use tevent_req_nterror properly

Might be minor, but the less example of wrong API use we have the better
it is.

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/torture/torture.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 8313cf1..573e3f8 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -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);
-- 
1.8.1.2



More information about the samba-technical mailing list