summaryrefslogtreecommitdiff
path: root/source4/libcli/ndr/ndr_basic.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-04 22:42:00 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-04 22:42:00 +0000
commitc1b3ebb1fa51a8b91e94d48ec272846235de1c03 (patch)
tree36b7c18702c7069587cfdde60325bed1e499a918 /source4/libcli/ndr/ndr_basic.c
parent41304b3c5791be0a5492844a048784c4ef4acfe9 (diff)
downloadsamba-c1b3ebb1fa51a8b91e94d48ec272846235de1c03.tar.gz
samba-c1b3ebb1fa51a8b91e94d48ec272846235de1c03.tar.bz2
samba-c1b3ebb1fa51a8b91e94d48ec272846235de1c03.zip
fixed some error found by valgrind
(This used to be commit ca5f0ccb6cd10d51c96a5cd8e0cd97d50cbb9a73)
Diffstat (limited to 'source4/libcli/ndr/ndr_basic.c')
-rw-r--r--source4/libcli/ndr/ndr_basic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/ndr/ndr_basic.c b/source4/libcli/ndr/ndr_basic.c
index 21326c2a62..138e1f1a6c 100644
--- a/source4/libcli/ndr/ndr_basic.c
+++ b/source4/libcli/ndr/ndr_basic.c
@@ -120,8 +120,8 @@ NTSTATUS ndr_pull_guid(struct ndr_pull *ndr, GUID *guid)
#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, ndr->offset+(n)))
#define NDR_PUSH_ALIGN(ndr, n) do { \
- ndr->offset = (ndr->offset + (n-1)) & ~(n-1); \
- NDR_CHECK(ndr_push_expand(ndr, ndr->offset)); \
+ uint32 _pad = (ndr->offset & (n-1)); \
+ while (_pad--) NDR_CHECK(ndr_push_u8(ndr, 0)); \
} while(0)
/*