s4:libcli:resolve: fix O3 error unused result of write
authorMichael Adam <obnox@samba.org>
Fri, 25 Mar 2016 00:29:40 +0000 (01:29 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 12 May 2016 22:16:15 +0000 (00:16 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
source4/libcli/resolve/dns_ex.c

index 08b693272237ee2dd61927bbb7aa9dbc5b79a342..6174b617cb37137a9f89fcd1fe48b697b6dcdc6f 100644 (file)
@@ -41,6 +41,7 @@
 #include "lib/util/util_net.h"
 #include "lib/addns/dnsquery.h"
 #include "lib/addns/dns.h"
+#include "lib/util/sys_rw.h"
 #include <arpa/nameser.h>
 #include <resolv.h>
 
@@ -370,7 +371,7 @@ static void run_child_dns_lookup(struct dns_ex_state *state, int fd)
 
        if (addrs) {
                DEBUG(11, ("Addrs = %s\n", addrs));
-               write(fd, addrs, talloc_get_size(addrs));
+               sys_write_v(fd, addrs, talloc_get_size(addrs));
        }
 
 done:
@@ -436,7 +437,7 @@ static void run_child_getaddrinfo(struct dns_ex_state *state, int fd)
        }
 
        if (addrs) {
-               write(fd, addrs, talloc_get_size(addrs));
+               sys_write_v(fd, addrs, talloc_get_size(addrs));
        }
 done:
        if (res_list) {