diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-07 11:44:43 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 12:40:08 +0200 |
commit | ad0a07c531fadd1639c5298951cfaf5cfe0cb10e (patch) | |
tree | a00938a8289ff4e9747622f1d46fa3607c7c50eb /source3/libgpo | |
parent | d5e6a47f064a3923b1e257ab84fa7ccd7c4f89f4 (diff) | |
download | samba-ad0a07c531fadd1639c5298951cfaf5cfe0cb10e.tar.gz samba-ad0a07c531fadd1639c5298951cfaf5cfe0cb10e.tar.bz2 samba-ad0a07c531fadd1639c5298951cfaf5cfe0cb10e.zip |
s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
Diffstat (limited to 'source3/libgpo')
-rw-r--r-- | source3/libgpo/gpext/registry.c | 6 | ||||
-rw-r--r-- | source3/libgpo/gpext/scripts.c | 6 | ||||
-rw-r--r-- | source3/libgpo/gpext/security.c | 2 | ||||
-rw-r--r-- | source3/libgpo/gpo_reg.c | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c index eb49b19b20..b0ec7b88d9 100644 --- a/source3/libgpo/gpext/registry.c +++ b/source3/libgpo/gpext/registry.c @@ -111,14 +111,14 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx, ZERO_STRUCTP(*reg_entry); - data = TALLOC_ZERO_P(mem_ctx, struct registry_value); + data = talloc_zero(mem_ctx, struct registry_value); if (!data) return false; data->type = r->type; data->data = data_blob_talloc(data, r->data, r->size); - entry = TALLOC_ZERO_P(mem_ctx, struct gp_registry_entry); + entry = talloc_zero(mem_ctx, struct gp_registry_entry); if (!entry) return false; @@ -327,7 +327,7 @@ static NTSTATUS registry_get_reg_config(TALLOC_CTX *mem_ctx, { NULL, REG_NONE, NULL } }; - info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info); + info = talloc_zero(mem_ctx, struct gp_extension_reg_info); NT_STATUS_HAVE_NO_MEMORY(info); status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, diff --git a/source3/libgpo/gpext/scripts.c b/source3/libgpo/gpext/scripts.c index 3e977378ee..0b6748507a 100644 --- a/source3/libgpo/gpext/scripts.c +++ b/source3/libgpo/gpext/scripts.c @@ -62,7 +62,7 @@ static NTSTATUS scripts_get_reg_config(TALLOC_CTX *mem_ctx, { NULL, REG_NONE, NULL }, }; - info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info); + info = talloc_zero(mem_ctx, struct gp_extension_reg_info); NT_STATUS_HAVE_NO_MEMORY(info); status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, @@ -89,10 +89,10 @@ static NTSTATUS generate_gp_registry_entry(TALLOC_CTX *mem_ctx, struct gp_registry_entry *entry = NULL; struct registry_value *data = NULL; - entry = TALLOC_ZERO_P(mem_ctx, struct gp_registry_entry); + entry = talloc_zero(mem_ctx, struct gp_registry_entry); NT_STATUS_HAVE_NO_MEMORY(entry); - data = TALLOC_ZERO_P(mem_ctx, struct registry_value); + data = talloc_zero(mem_ctx, struct registry_value); NT_STATUS_HAVE_NO_MEMORY(data); data->type = data_type; diff --git a/source3/libgpo/gpext/security.c b/source3/libgpo/gpext/security.c index dea0de33f9..b68840d2f6 100644 --- a/source3/libgpo/gpext/security.c +++ b/source3/libgpo/gpext/security.c @@ -202,7 +202,7 @@ static NTSTATUS security_get_reg_config(TALLOC_CTX *mem_ctx, { NULL, REG_NONE, NULL } }; - info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info); + info = talloc_zero(mem_ctx, struct gp_extension_reg_info); NT_STATUS_HAVE_NO_MEMORY(info); status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, diff --git a/source3/libgpo/gpo_reg.c b/source3/libgpo/gpo_reg.c index 29b31aec8e..5142e919cc 100644 --- a/source3/libgpo/gpo_reg.c +++ b/source3/libgpo/gpo_reg.c @@ -36,7 +36,7 @@ struct security_token *registry_create_system_token(TALLOC_CTX *mem_ctx) { struct security_token *token = NULL; - token = TALLOC_ZERO_P(mem_ctx, struct security_token); + token = talloc_zero(mem_ctx, struct security_token); if (!token) { DEBUG(1,("talloc failed\n")); return NULL; @@ -74,7 +74,7 @@ WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx, return werr; } - tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context); + tmp_ctx = talloc_zero(mem_ctx, struct gp_registry_context); W_ERROR_HAVE_NO_MEMORY(tmp_ctx); if (token) { @@ -395,7 +395,7 @@ static WERROR gp_reg_read_groupmembership(TALLOC_CTX *mem_ctx, int num_token_sids = 0; struct security_token *tmp_token = NULL; - tmp_token = TALLOC_ZERO_P(mem_ctx, struct security_token); + tmp_token = talloc_zero(mem_ctx, struct security_token); W_ERROR_HAVE_NO_MEMORY(tmp_token); path = gp_reg_groupmembership_path(mem_ctx, object_sid, flags); @@ -602,7 +602,7 @@ static WERROR gp_read_reg_gpo(TALLOC_CTX *mem_ctx, return WERR_INVALID_PARAM; } - gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT); + gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT); W_ERROR_HAVE_NO_MEMORY(gpo); werr = gp_read_reg_gpovals(mem_ctx, key, gpo); |