diff options
author | Michael Adam <obnox@samba.org> | 2016-03-25 02:04:58 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2016-05-13 00:16:15 +0200 |
commit | 2d8a3125f25d108dba1ede497b3878d4025351ef (patch) | |
tree | 50110aa6a2675a0c658f9c7732e1295f1fa3d3b6 /source4/lib/registry | |
parent | c15023449534a318ea57b28efa9ce9e800220952 (diff) | |
download | samba-2d8a3125f25d108dba1ede497b3878d4025351ef.tar.gz |
s4:registry:patchfile: fix O3 error unused result of write
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'source4/lib/registry')
-rw-r--r-- | source4/lib/registry/patchfile_preg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index 8017b5814f3..19ebb6ac579 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -23,6 +23,7 @@ #include "lib/registry/registry.h" #include "system/filesys.h" #include "librpc/gen_ndr/winreg.h" +#include "lib/util/sys_rw.h" struct preg_data { int fd; @@ -71,12 +72,12 @@ static WERROR reg_preg_diff_set_value(void *_data, const char *key_name, preg_write_utf16(data->fd, value_name); preg_write_utf16(data->fd, ";"); SIVAL(&buf, 0, value_type); - write(data->fd, &buf, sizeof(uint32_t)); + sys_write_v(data->fd, &buf, sizeof(uint32_t)); preg_write_utf16(data->fd, ";"); SIVAL(&buf, 0, value_data.length); - write(data->fd, &buf, sizeof(uint32_t)); + sys_write_v(data->fd, &buf, sizeof(uint32_t)); preg_write_utf16(data->fd, ";"); - write(data->fd, value_data.data, value_data.length); + sys_write_v(data->fd, value_data.data, value_data.length); preg_write_utf16(data->fd, "]"); return WERR_OK; @@ -189,7 +190,7 @@ _PUBLIC_ WERROR reg_preg_diff_save(TALLOC_CTX *ctx, const char *filename, memcpy(preg_header.hdr, "PReg", sizeof(preg_header.hdr)); SIVAL(&preg_header.version, 0, 1); - write(data->fd, (uint8_t *)&preg_header, sizeof(preg_header)); + sys_write_v(data->fd, (uint8_t *)&preg_header, sizeof(preg_header)); data->ctx = ctx; |