From 17781b1c863332b9a808b8052119b70b122ff9f3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Dec 2011 11:18:04 +0100 Subject: s4:libcli/rap: use talloc_zero() and initialize everything metze --- source4/libcli/rap/rap.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source4') diff --git a/source4/libcli/rap/rap.c b/source4/libcli/rap/rap.c index 007c52037f..bebe9fb1dd 100644 --- a/source4/libcli/rap/rap.c +++ b/source4/libcli/rap/rap.c @@ -30,18 +30,13 @@ struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, uint16_t callno) { struct rap_call *call; - call = talloc(mem_ctx, struct rap_call); - - if (call == NULL) + call = talloc_zero(mem_ctx, struct rap_call); + if (call == NULL) { return NULL; + } call->callno = callno; call->rcv_paramlen = 4; - call->rcv_datalen = 0; - - call->paramdesc = NULL; - call->datadesc = NULL; - call->auxdatadesc = NULL; call->ndr_push_param = ndr_push_init_ctx(mem_ctx); call->ndr_push_param->flags = RAPNDR_FLAGS; -- cgit