summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_spoolss_buf.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-05 18:34:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:57 -0500
commit631aa1f0efa75924c4d8ba639de80527fb8da7b5 (patch)
tree6b6e0f16c6f5d1ec96cff1344973808c86311898 /source4/librpc/ndr/ndr_spoolss_buf.c
parentdf036e08294ec98a2c7049f7f2fe03de1fd2ae44 (diff)
downloadsamba-631aa1f0efa75924c4d8ba639de80527fb8da7b5.tar.gz
samba-631aa1f0efa75924c4d8ba639de80527fb8da7b5.tar.bz2
samba-631aa1f0efa75924c4d8ba639de80527fb8da7b5.zip
r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be : type *name[]; rather then : type *name; which was supported in the past. Warnings will be given when the first syntax is used. Reasons for this change in behaviour include improved readability and the fact that the second format makes dealing with multiple levels of pointers harder. (This used to be commit a416de5825c540fd3741731c4be05e9a659a6fdb)
Diffstat (limited to 'source4/librpc/ndr/ndr_spoolss_buf.c')
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index e13e912b68..4b1483709a 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -39,7 +39,8 @@
for (i=0;i<r->out.count;i++) {\
ndr2->data += ndr2->offset;\
ndr2->offset = 0;\
- NDR_CHECK(ndr_push_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, r->in.level, &(*r->out.info)[i]));\
+ NDR_CHECK(ndr_push_set_switch_value(ndr2, &(*r->out.info)[i], r->in.level)); \
+ NDR_CHECK(ndr_push_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, &(*r->out.info)[i]));\
}\
if (*r->in.buf_size >= ndr2->offset) {\
buffer = data_blob_const(ndr2->data, ndr2->offset);\
@@ -94,7 +95,8 @@
for (i=0;i<r->out.count;i++) {\
ndr2->data += ndr2->offset;\
ndr2->offset = 0;\
- NDR_CHECK(ndr_pull_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, r->in.level, &(*r->out.info)[i]));\
+ NDR_CHECK(ndr_pull_set_switch_value(ndr2, &(*r->out.info)[i], r->in.level)); \
+ NDR_CHECK(ndr_pull_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, &(*r->out.info)[i]));\
}\
}\
} while(0)