From d4d6d0d2e54510690fa3f868ad02625bc24e5b9d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 18 Jun 2005 01:58:36 +0000 Subject: r7706: Move ParseExpr() to util. (This used to be commit 72efb695291f0ad3cdc80daa9f979454f6a81c04) --- source4/librpc/ndr/ndr_string.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c index 95e9df39f06..134e4b80592 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; } -- cgit