diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/registry/reg_objects.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/registry/reg_objects.c')
-rw-r--r-- | source3/registry/reg_objects.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 0fab3f7d8b..62487e1e4f 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -23,6 +23,7 @@ #include "includes.h" #include "registry.h" #include "reg_objects.h" +#include "util_tdb.h" #include "dbwrap.h" #include "../libcli/registry/util_reg.h" @@ -61,7 +62,7 @@ struct regsubkey_ctr { context for internal private data. There is no longer a regval_ctr_intit() and regval_ctr_destroy() - pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the + pair of functions. Simply talloc_zero() and TALLOC_FREE() the object. **********************************************************************/ @@ -210,7 +211,7 @@ WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname ) return WERR_OK; } - if (!(newkeys = TALLOC_REALLOC_ARRAY(ctr, ctr->subkeys, char *, + if (!(newkeys = talloc_realloc(ctr, ctr->subkeys, char *, ctr->num_subkeys+1))) { return WERR_NOMEM; } @@ -465,7 +466,7 @@ struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name, uint32_t type, const uint8_t *data_p, size_t size) { - struct regval_blob *regval = TALLOC_P(ctx, struct regval_blob); + struct regval_blob *regval = talloc(ctx, struct regval_blob); if (regval == NULL) { return NULL; @@ -474,7 +475,7 @@ struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name, fstrcpy(regval->valuename, name); regval->type = type; if (size) { - regval->data_p = (uint8_t *)TALLOC_MEMDUP(regval, data_p, size); + regval->data_p = (uint8_t *)talloc_memdup(regval, data_p, size); if (!regval->data_p) { TALLOC_FREE(regval); return NULL; @@ -504,9 +505,9 @@ int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint32_t type, /* allocate a slot in the array of pointers */ if ( ctr->num_values == 0 ) { - ctr->values = TALLOC_P( ctr, struct regval_blob *); + ctr->values = talloc( ctr, struct regval_blob *); } else { - ctr->values = TALLOC_REALLOC_ARRAY(ctr, ctr->values, + ctr->values = talloc_realloc(ctr, ctr->values, struct regval_blob *, ctr->num_values+1); } |