s3: Remove a use of cli_errstr
authorVolker Lendecke <vl@samba.org>
Thu, 7 Jul 2011 13:42:33 +0000 (15:42 +0200)
committerVolker Lendecke <vlendec@samba.org>
Thu, 7 Jul 2011 16:04:26 +0000 (18:04 +0200)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jul  7 18:04:26 CEST 2011 on sn-devel-104

source3/torture/torture.c

index 7e2a5e7beb0c82b840c9bd09dc97f77472399fc8..64f8bf77b66e031be176a9072188c635c3ad9db4 100644 (file)
@@ -642,8 +642,12 @@ static bool rw_torture3(struct cli_state *c, char *lockfname)
 
        if (procnum == 0)
        {
-               if (!NT_STATUS_IS_OK(cli_unlink(c, lockfname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
-                       printf("unlink failed (%s) (normal, this file should not exist)\n", cli_errstr(c));
+               status = cli_unlink(
+                       c, lockfname,
+                       FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
+               if (!NT_STATUS_IS_OK(status)) {
+                       printf("unlink failed (%s) (normal, this file should "
+                              "not exist)\n", nt_errstr(status));
                }
 
                status = cli_open(c, lockfname, O_RDWR | O_CREAT | O_EXCL,