summaryrefslogtreecommitdiff
path: root/source3/aparser/templates/prs_array_optional.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'source3/aparser/templates/prs_array_optional.tpl')
-rw-r--r--source3/aparser/templates/prs_array_optional.tpl5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/aparser/templates/prs_array_optional.tpl b/source3/aparser/templates/prs_array_optional.tpl
new file mode 100644
index 0000000000..38bd32861f
--- /dev/null
+++ b/source3/aparser/templates/prs_array_optional.tpl
@@ -0,0 +1,5 @@
+ if ((MARSHALLING(ps) && il->@ELEM@) ||
+ ps->data_offset < ps->buffer_size) {
+ if (!io_alloc("@ELEM@", ps, (void **)&il->@ELEM@, sizeof(*(il->@ELEM@)))) goto fail;
+ if (!io_@TYPE@("@ELEM@...", ps, depth+1, il->@ELEM@, @FLAGS@)) goto fail;
+ }