summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse/parse_buffer.c')
-rw-r--r--source3/rpc_parse/parse_buffer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_buffer.c b/source3/rpc_parse/parse_buffer.c
index b5177cc634..99546ef3fb 100644
--- a/source3/rpc_parse/parse_buffer.c
+++ b/source3/rpc_parse/parse_buffer.c
@@ -30,14 +30,15 @@
/**********************************************************************
Initialize a new spoolss buff for use by a client rpc
**********************************************************************/
-void rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx)
+bool rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx)
{
buffer->size = size;
buffer->string_at_end = size;
- if (prs_init(&buffer->prs, size, ctx, MARSHALL))
- buffer->struct_start = prs_offset(&buffer->prs);
- else
- buffer->struct_start = 0;
+ if (!prs_init(&buffer->prs, size, ctx, MARSHALL))
+ return false;
+
+ buffer->struct_start = prs_offset(&buffer->prs);
+ return true;
}
/*******************************************************************