diff options
author | Michael Adam <obnox@samba.org> | 2009-02-24 22:43:47 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-02-26 13:22:51 +0100 |
commit | 763f41f39c2b3c3488992297bc1c0e1ab785ad07 (patch) | |
tree | e291decd8ae7267d2573d0556f119b1d6ad20d61 /source3/registry/reg_objects.c | |
parent | 060abd7e38bff8cecf5821e9a9878f18c04a7a1d (diff) | |
download | samba-763f41f39c2b3c3488992297bc1c0e1ab785ad07.tar.gz |
s3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr
Michael
Diffstat (limited to 'source3/registry/reg_objects.c')
-rw-r--r-- | source3/registry/reg_objects.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 15f98797067..10ad41e84b3 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 **********************************************************************/ |