s4:torture:basic: fix O3 error unused result of write
authorMichael Adam <obnox@samba.org>
Tue, 5 Apr 2016 16:16:46 +0000 (18:16 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 12 May 2016 22:16:16 +0000 (00:16 +0200)
in test_utable

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
source4/torture/basic/utable.c

index 0b4569235d90f452a5bf54a12a0865797eeeb253..da2fe2e0b377a367e18c008e1f3b7bd16ac07597 100644 (file)
@@ -24,6 +24,7 @@
 #include "torture/util.h"
 #include "param/param.h"
 #include "torture/basic/proto.h"
+#include "lib/util/sys_rw.h"
 
 bool torture_utable(struct torture_context *tctx, 
                                        struct smbcli_state *cli)
@@ -96,7 +97,7 @@ bool torture_utable(struct torture_context *tctx,
        torture_assert(tctx, fd != -1, 
                talloc_asprintf(tctx, 
                "Failed to create valid.dat - %s", strerror(errno)));
-       write(fd, valid, 0x10000);
+       sys_write_v(fd, valid, 0x10000);
        close(fd);
        torture_comment(tctx, "wrote valid.dat\n");