From 763f41f39c2b3c3488992297bc1c0e1ab785ad07 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 24 Feb 2009 22:43:47 +0100 Subject: s3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr Michael --- source3/registry/reg_objects.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source3/registry/reg_objects.c') diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 15f9879706..10ad41e84b 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -30,12 +30,26 @@ talloc()'d since the methods use the object pointer as the talloc context for internal private data. - There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy() + There is no longer a regval_ctr_intit() and regval_ctr_destroy() pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the object. **********************************************************************/ +WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr) +{ + if (ctr == NULL) { + return WERR_INVALID_PARAM; + } + + *ctr = talloc_zero(mem_ctx, struct regsubkey_ctr); + if (*ctr == NULL) { + return WERR_NOMEM; + } + + return WERR_OK; +} + /*********************************************************************** Add a new key to the array **********************************************************************/ -- cgit