summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-23 22:47:53 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:28 +0200
commite0d5bccfd381ebb83ee7d626ee94087d47f4b8dd (patch)
tree524cf9a514d432f22f4bb003e2eafa28f47dfd68 /source3/registry
parent97846edfa59b95572d176981bb4bab6a5c06b61c (diff)
downloadsamba-e0d5bccfd381ebb83ee7d626ee94087d47f4b8dd.tar.gz
samba-e0d5bccfd381ebb83ee7d626ee94087d47f4b8dd.tar.bz2
samba-e0d5bccfd381ebb83ee7d626ee94087d47f4b8dd.zip
s3:registry:reg_objects: add regval_ctr_init()
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_objects.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 52f2b6bbf1..148fdee7f2 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -293,6 +293,23 @@ char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32_t key_index
* Utility functions for struct regval_ctr
*/
+/**
+ * allocate a regval_ctr structure.
+ */
+WERROR regval_ctr_init(TALLOC_CTX *mem_ctx, struct regval_ctr **ctr)
+{
+ if (ctr == NULL) {
+ return WERR_INVALID_PARAM;
+ }
+
+ *ctr = talloc_zero(mem_ctx, struct regval_ctr);
+ if (*ctr == NULL) {
+ return WERR_NOMEM;
+ }
+
+ return WERR_OK;
+}
+
/***********************************************************************
How many keys does the container hold ?
**********************************************************************/