summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/ndr/ndr_string.c')
-rw-r--r--source4/librpc/ndr/ndr_string.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c
index 95e9df39f0..134e4b8059 100644
--- a/source4/librpc/ndr/ndr_string.c
+++ b/source4/librpc/ndr/ndr_string.c
@@ -618,17 +618,16 @@ NTSTATUS ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags, char **var, uint3
NTSTATUS ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const char *var, uint32_t length, uint8_t byte_mul, int chset)
{
- int ret;
+ ssize_t ret;
NDR_PUSH_NEED_BYTES(ndr, byte_mul*length);
ret = convert_string(CH_UNIX, chset,
var, length,
- ndr->data+ndr->offset,
- byte_mul*length);
+ ndr->data+ndr->offset, byte_mul*length);
if (ret == -1) {
return ndr_push_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion");
}
- ndr->offset += byte_mul*length;
+ ndr->offset += ret;
return NT_STATUS_OK;
}