summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r--source4/librpc/ndr/ndr_basic.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index a906e0c05b..f1996b55f7 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -151,19 +151,28 @@ NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, uint16 *data, uint32 n)
}
/*
+ pull a const array of uint32
+*/
+NTSTATUS ndr_pull_const_array_uint32(struct ndr_pull *ndr, uint32 *data, uint32 n)
+{
+ uint32 i;
+ for (i=0;i<n;i++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, &data[i]));
+ }
+ return NT_STATUS_OK;
+}
+
+/*
pull an array of uint32
*/
NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, uint32 *data, uint32 n)
{
- uint32 len, i;
+ uint32 len;
NDR_CHECK(ndr_pull_uint32(ndr, &len));
if (len != n) {
return NT_STATUS_INVALID_PARAMETER;
}
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_pull_uint32(ndr, &data[i]));
- }
- return NT_STATUS_OK;
+ return ndr_pull_const_array_uint32(ndr, data, n);
}