s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 7 Jun 2011 01:44:43 +0000 (11:44 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Jun 2011 10:40:08 +0000 (12:40 +0200)
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.

114 files changed:
lib/addns/dnsmarshall.c
lib/addns/dnsrecord.c
lib/addns/dnssock.c
lib/addns/dnsutils.c
libgpo/gpext/gpext.c
libgpo/gpo_ldap.c
nsswitch/pam_winbind.c
source3/auth/auth_builtin.c
source3/auth/auth_domain.c
source3/auth/auth_netlogond.c
source3/auth/auth_sam.c
source3/auth/auth_samba4.c
source3/auth/auth_script.c
source3/auth/auth_server.c
source3/auth/auth_unix.c
source3/auth/auth_wbc.c
source3/auth/auth_winbind.c
source3/auth/check_samsec.c
source3/auth/server_info.c
source3/auth/token_util.c
source3/include/smb_macros.h
source3/lib/ctdb_packet.c
source3/lib/ctdbd_conn.c
source3/lib/dbwrap_ctdb.c
source3/lib/dbwrap_file.c
source3/lib/dbwrap_rbt.c
source3/lib/dbwrap_tdb.c
source3/lib/eventlog/eventlog.c
source3/lib/events.c
source3/lib/memcache.c
source3/lib/messages.c
source3/lib/messages_local.c
source3/lib/netapi/cm.c
source3/lib/netapi/localgroup.c
source3/lib/netapi/netapi.c
source3/lib/smbconf/smbconf_reg.c
source3/lib/smbldap.c
source3/lib/util_cmdline.c
source3/lib/util_nttoken.c
source3/libads/ldap.c
source3/libgpo/gpext/registry.c
source3/libgpo/gpext/scripts.c
source3/libgpo/gpext/security.c
source3/libgpo/gpo_reg.c
source3/libnet/libnet_dssync.c
source3/libnet/libnet_dssync_keytab.c
source3/libnet/libnet_keytab.c
source3/libnet/libnet_samsync.c
source3/libnet/libnet_samsync_ldif.c
source3/libsmb/clidgram.c
source3/libsmb/clientgen.c
source3/libsmb/cliquota.c
source3/libsmb/dsgetdcname.c
source3/libsmb/samlogon_cache.c
source3/libsmb/unexpected.c
source3/locking/brlock.c
source3/locking/locking.c
source3/modules/vfs_aio_fork.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_smb_traffic_analyzer.c
source3/modules/vfs_tsmsm.c
source3/modules/vfs_xattr_tdb.c
source3/nmbd/nmbd_processlogon.c
source3/passdb/passdb.c
source3/passdb/pdb_ldap.c
source3/passdb/pdb_smbpasswd.c
source3/printing/nt_printing.c
source3/registry/reg_api.c
source3/registry/reg_objects.c
source3/registry/reg_util_token.c
source3/registry/regfio.c
source3/rpc_client/cli_netlogon.c
source3/rpc_client/cli_pipe.c
source3/rpc_server/dfs/srv_dfs_nt.c
source3/rpc_server/dssetup/srv_dssetup_nt.c
source3/rpc_server/eventlog/srv_eventlog_nt.c
source3/rpc_server/lsa/srv_lsa_nt.c
source3/rpc_server/netlogon/srv_netlog_nt.c
source3/rpc_server/rpc_ncacn_np.c
source3/rpc_server/samr/srv_samr_nt.c
source3/rpc_server/srvsvc/srv_srvsvc_nt.c
source3/rpc_server/svcctl/srv_svcctl_nt.c
source3/smbd/aio.c
source3/smbd/conn.c
source3/smbd/dir.c
source3/smbd/message.c
source3/smbd/msdfs.c
source3/smbd/notify.c
source3/smbd/notify_internal.c
source3/smbd/ntquotas.c
source3/smbd/nttrans.c
source3/smbd/posix_acls.c
source3/smbd/process.c
source3/smbd/smb2_ioctl.c
source3/smbd/trans2.c
source3/smbd/vfs.c
source3/torture/vfstest.c
source3/utils/net_rpc.c
source3/utils/net_rpc_registry.c
source3/winbindd/idmap_ad.c
source3/winbindd/idmap_adex/cell_util.c
source3/winbindd/idmap_adex/domain_util.c
source3/winbindd/idmap_adex/gc_util.c
source3/winbindd/idmap_adex/likewise_cell.c
source3/winbindd/idmap_autorid.c
source3/winbindd/idmap_ldap.c
source3/winbindd/idmap_rid.c
source3/winbindd/nss_info.c
source3/winbindd/wb_lookupsids.c
source3/winbindd/winbindd.c
source3/winbindd/winbindd_cred_cache.c
source3/winbindd/winbindd_dual.c
source3/winbindd/winbindd_rpc.c
source3/winbindd/winbindd_util.c

index 3401b31469df37ffb4261359d762cf6f8bd9e992..59d6470f3458f1695cacf11df83814a7d45a407f 100644 (file)
@@ -390,7 +390,7 @@ DNS_ERROR dns_unmarshall_request(TALLOC_CTX *mem_ctx,
        uint16 i;
        DNS_ERROR err;
 
        uint16 i;
        DNS_ERROR err;
 
-       if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_request))) {
+       if (!(req = talloc_zero(mem_ctx, struct dns_request))) {
                return ERROR_DNS_NO_MEMORY;
        }
 
                return ERROR_DNS_NO_MEMORY;
        }
 
index 2d0dc9ec5bea6d9f3cb787a942dd8f8e47f83df9..cdbae58c90cdfadddfb4d9d656115e3514d4dec1 100644 (file)
@@ -31,7 +31,7 @@ DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name,
        struct dns_question *q;
        DNS_ERROR err;
 
        struct dns_question *q;
        DNS_ERROR err;
 
-       if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_request)) ||
+       if (!(req = talloc_zero(mem_ctx, struct dns_request)) ||
            !(req->questions = talloc_array(req, struct dns_question *, 1)) ||
            !(req->questions[0] = talloc(req->questions,
                                         struct dns_question))) {
            !(req->questions = talloc_array(req, struct dns_question *, 1)) ||
            !(req->questions[0] = talloc(req->questions,
                                         struct dns_question))) {
@@ -64,7 +64,7 @@ DNS_ERROR dns_create_update( TALLOC_CTX *mem_ctx, const char *name,
        struct dns_zone *z;
        DNS_ERROR err;
 
        struct dns_zone *z;
        DNS_ERROR err;
 
-       if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_update_request)) ||
+       if (!(req = talloc_zero(mem_ctx, struct dns_update_request)) ||
            !(req->zones = talloc_array(req, struct dns_zone *, 1)) ||
            !(req->zones[0] = talloc(req->zones, struct dns_zone))) {
                TALLOC_FREE(req);
            !(req->zones = talloc_array(req, struct dns_zone *, 1)) ||
            !(req->zones[0] = talloc(req->zones, struct dns_zone))) {
                TALLOC_FREE(req);
index da8a52100e31eae7582d5cd74b6818a4bd861ffc..aaeb3f03fa6c55ba557993a8353f35c73d29484f 100644 (file)
@@ -250,7 +250,7 @@ static DNS_ERROR dns_receive_tcp(TALLOC_CTX *mem_ctx,
        DNS_ERROR err;
        uint16 len;
 
        DNS_ERROR err;
        uint16 len;
 
-       if (!(buf = TALLOC_ZERO_P(mem_ctx, struct dns_buffer))) {
+       if (!(buf = talloc_zero(mem_ctx, struct dns_buffer))) {
                return ERROR_DNS_NO_MEMORY;
        }
 
                return ERROR_DNS_NO_MEMORY;
        }
 
@@ -287,7 +287,7 @@ static DNS_ERROR dns_receive_udp(TALLOC_CTX *mem_ctx,
        struct dns_buffer *buf;
        ssize_t received;
 
        struct dns_buffer *buf;
        ssize_t received;
 
-       if (!(buf = TALLOC_ZERO_P(mem_ctx, struct dns_buffer))) {
+       if (!(buf = talloc_zero(mem_ctx, struct dns_buffer))) {
                return ERROR_DNS_NO_MEMORY;
        }
 
                return ERROR_DNS_NO_MEMORY;
        }
 
index 526179bee3a667471f0fe807aa9e4016e1dddf6a..43305a98730aa1451ba54ec5a754bd8b7ac39d94 100644 (file)
@@ -53,7 +53,7 @@ static DNS_ERROR LabelList( TALLOC_CTX *mem_ctx,
                return ERROR_DNS_INVALID_NAME;
        }
 
                return ERROR_DNS_INVALID_NAME;
        }
 
-       if (!(result = TALLOC_ZERO_P(mem_ctx, struct dns_domain_label))) {
+       if (!(result = talloc_zero(mem_ctx, struct dns_domain_label))) {
                return ERROR_DNS_NO_MEMORY;
        }
 
                return ERROR_DNS_NO_MEMORY;
        }
 
index ac6c181e34c671fce96fe9cbb871c7ea78690ac4..640aae6aaf25edb3de0c9dbc1cf643e1f26bc72c 100644 (file)
@@ -351,7 +351,7 @@ NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx,
        NTSTATUS status;
        struct gp_extension_reg_info_entry *entry = NULL;
 
        NTSTATUS status;
        struct gp_extension_reg_info_entry *entry = NULL;
 
-       entry = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info_entry);
+       entry = talloc_zero(mem_ctx, struct gp_extension_reg_info_entry);
        NT_STATUS_HAVE_NO_MEMORY(entry);
 
        status = GUID_from_string(ext_guid, &entry->guid);
        NT_STATUS_HAVE_NO_MEMORY(entry);
 
        status = GUID_from_string(ext_guid, &entry->guid);
index debae53da1f4c6814a0f2af666df36d45bd865c0..9d984b5b9903ae6a4aebd3e2eaaa07e7682c7ec0 100644 (file)
@@ -582,7 +582,7 @@ static ADS_STATUS add_gplink_to_gpo_list(ADS_STRUCT *ads,
                        }
                }
 
                        }
                }
 
-               new_gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);
+               new_gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT);
                ADS_ERROR_HAVE_NO_MEMORY(new_gpo);
 
                status = ads_get_gpo(ads, mem_ctx, gp_link->link_names[i],
                ADS_ERROR_HAVE_NO_MEMORY(new_gpo);
 
                status = ads_get_gpo(ads, mem_ctx, gp_link->link_names[i],
@@ -688,7 +688,7 @@ static ADS_STATUS add_local_policy_to_gpo_list(TALLOC_CTX *mem_ctx,
 
        ADS_ERROR_HAVE_NO_MEMORY(gpo_list);
 
 
        ADS_ERROR_HAVE_NO_MEMORY(gpo_list);
 
-       gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);
+       gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT);
        ADS_ERROR_HAVE_NO_MEMORY(gpo);
 
        gpo->name = talloc_strdup(mem_ctx, "Local Policy");
        ADS_ERROR_HAVE_NO_MEMORY(gpo);
 
        gpo->name = talloc_strdup(mem_ctx, "Local Policy");
index 7d5b70e1bdf56f80217a74008595b4ced6c71c6b..e59a6d8ea1600fbc2dee3732eb28293d951b35d7 100644 (file)
@@ -536,7 +536,7 @@ static int _pam_winbind_init_context(pam_handle_t *pamh,
        textdomain_init();
 #endif
 
        textdomain_init();
 #endif
 
-       r = TALLOC_ZERO_P(NULL, struct pwb_context);
+       r = talloc_zero(NULL, struct pwb_context);
        if (!r) {
                return PAM_BUF_ERR;
        }
        if (!r) {
                return PAM_BUF_ERR;
        }
index afe71ee2a6095e6d4b15d32c45f0ac37da49f773..cfe89495a01a88822b94a99293e610c0a271e304 100644 (file)
@@ -57,7 +57,7 @@ static NTSTATUS auth_init_guest(struct auth_context *auth_context, const char *o
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -117,7 +117,7 @@ static NTSTATUS auth_init_name_to_ntstatus(struct auth_context *auth_context, co
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -171,7 +171,7 @@ static NTSTATUS auth_init_fixed_challenge(struct auth_context *auth_context, con
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 8a716038a8251dcba4c8ee9789c350b263fa8d6c..2afff6fc7b66aff243bcf19d7aef85cd9333eb91 100644 (file)
@@ -419,7 +419,7 @@ static NTSTATUS auth_init_ntdomain(struct auth_context *auth_context, const char
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -525,7 +525,7 @@ static NTSTATUS auth_init_trustdomain(struct auth_context *auth_context, const c
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 8e332c8e5aae555bfbee748734f0487e4781a8fc..e9a74b6d1219be6aa8846a85bea932641971fac7 100644 (file)
@@ -429,7 +429,7 @@ static NTSTATUS auth_init_netlogond(struct auth_context *auth_context,
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index d09d60e6cf74332055d23bf1eaa41e38002bc433..7faa8de02752ece6bc82113a97a9d2e7a83615c1 100644 (file)
@@ -44,7 +44,7 @@ static NTSTATUS auth_init_sam_ignoredomain(struct auth_context *auth_context, co
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -108,7 +108,7 @@ static NTSTATUS auth_init_sam(struct auth_context *auth_context, const char *par
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 1b27e7bcc9837194aa1645f412cc5d2323b8162e..03b7884068da70c98fda2d3e8988b535af6e0d58 100644 (file)
@@ -99,7 +99,7 @@ static NTSTATUS auth_init_samba4(struct auth_context *auth_context,
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 5691ea14f11a60c1252f90031e624012bc1ed9eb..4432ff4aecc5edbbe90af93ad173878fd3c94761 100644 (file)
@@ -124,7 +124,7 @@ static NTSTATUS auth_init_script(struct auth_context *auth_context, const char *
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index d6538b6e10dc0cd9d1a9e6a10d15c306c71efe7a..33c658dd8fb96a6efe938e109c3690d9ea7b1f1f 100644 (file)
@@ -452,7 +452,7 @@ static NTSTATUS auth_init_smbserver(struct auth_context *auth_context, const cha
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 086c39e026f572ccbf1b19e5f3b443650ee06303..36956986c595b40badcc867e295ffa75337ac48f 100644 (file)
@@ -73,7 +73,7 @@ static NTSTATUS auth_init_unix(struct auth_context *auth_context, const char* pa
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 6150040229364bb940827a3ab2c191f5726c3347..1b70042d909730a25b26573c5930e00b9ceb6b42 100644 (file)
@@ -182,7 +182,7 @@ static NTSTATUS auth_init_wbc(struct auth_context *auth_context, const char *par
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 214335354150f795ab09d05ebe8015f383db32e1..d4ace2c9193c9ddcb59eadd89a3be1317843650b 100644 (file)
@@ -142,7 +142,7 @@ static NTSTATUS auth_init_winbind(struct auth_context *auth_context, const char
 {
        struct auth_methods *result;
 
 {
        struct auth_methods *result;
 
-       result = TALLOC_ZERO_P(auth_context, struct auth_methods);
+       result = talloc_zero(auth_context, struct auth_methods);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index c4bcda4b1b73c4339f6dcfb5c7f7214f8e842766..2d3cb657859965604acf3ad4292bdda0f4c05e3d 100644 (file)
@@ -531,7 +531,7 @@ NTSTATUS check_sam_security_info3(const DATA_BLOB *challenge,
                goto done;
        }
 
                goto done;
        }
 
-       info3 = TALLOC_ZERO_P(mem_ctx, struct netr_SamInfo3);
+       info3 = talloc_zero(mem_ctx, struct netr_SamInfo3);
        if (info3 == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
        if (info3 == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
index 440e45c8e5cbf8494f2153068a031e3efb263f4d..a53e556d283d2b11fca194e8972c7a4dc4f6ee33 100644 (file)
@@ -45,7 +45,7 @@ struct auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx)
 {
        struct auth_serversupplied_info *result;
 
 {
        struct auth_serversupplied_info *result;
 
-       result = TALLOC_ZERO_P(mem_ctx, struct auth_serversupplied_info);
+       result = talloc_zero(mem_ctx, struct auth_serversupplied_info);
        if (result == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
        if (result == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
index 386e66783415998b92de815d2a25644baca2b166..22df21f5ed498997a3dba4c3cf025387f53f1631 100644 (file)
@@ -338,7 +338,7 @@ struct security_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
        DEBUG(10, ("Create local NT token for %s\n",
                   sid_string_dbg(user_sid)));
 
        DEBUG(10, ("Create local NT token for %s\n",
                   sid_string_dbg(user_sid)));
 
-       if (!(result = TALLOC_ZERO_P(mem_ctx, struct security_token))) {
+       if (!(result = talloc_zero(mem_ctx, struct security_token))) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
        }
                DEBUG(0, ("talloc failed\n"));
                return NULL;
        }
index a51e9ec40789decefa0f6b58e728714ca7bed44a..73472dd61f2f969b1383e4f61dac2207723da1d3 100644 (file)
@@ -221,7 +221,6 @@ copy an IP address from one buffer to another
 #define TALLOC(ctx, size) talloc_named_const(ctx, size, __location__)
 #define TALLOC_MEMDUP(ctx, ptr, size) _talloc_memdup(ctx, ptr, size, __location__)
 #define TALLOC_ZERO(ctx, size) _talloc_zero(ctx, size, __location__)
 #define TALLOC(ctx, size) talloc_named_const(ctx, size, __location__)
 #define TALLOC_MEMDUP(ctx, ptr, size) _talloc_memdup(ctx, ptr, size, __location__)
 #define TALLOC_ZERO(ctx, size) _talloc_zero(ctx, size, __location__)
-#define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define TALLOC_ZERO_ARRAY(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)
 #define TALLOC_SIZE(ctx, size) talloc_named_const(ctx, size, __location__)
 #define TALLOC_ZERO_SIZE(ctx, size) _talloc_zero(ctx, size, __location__)
 #define TALLOC_ZERO_ARRAY(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)
 #define TALLOC_SIZE(ctx, size) talloc_named_const(ctx, size, __location__)
 #define TALLOC_ZERO_SIZE(ctx, size) _talloc_zero(ctx, size, __location__)
index 35c76fa44ff3f641ccca666b9b637fc40d5bcf9e..9faf519a6025390b1a1738ff1b5522b2d8e7a5e4 100644 (file)
@@ -44,7 +44,7 @@ struct ctdb_packet_context *ctdb_packet_init(TALLOC_CTX *mem_ctx, int fd)
 {
        struct ctdb_packet_context *result;
 
 {
        struct ctdb_packet_context *result;
 
-       if (!(result = TALLOC_ZERO_P(mem_ctx, struct ctdb_packet_context))) {
+       if (!(result = talloc_zero(mem_ctx, struct ctdb_packet_context))) {
                return NULL;
        }
 
                return NULL;
        }
 
index ecc331aa6a0f95ffd915337e6b541472a4f8bbbb..79dc1f246aad68d1cfde89822a832ad537df7e40 100644 (file)
@@ -494,7 +494,7 @@ static NTSTATUS ctdbd_init_connection(TALLOC_CTX *mem_ctx,
        struct ctdbd_connection *conn;
        NTSTATUS status;
 
        struct ctdbd_connection *conn;
        NTSTATUS status;
 
-       if (!(conn = TALLOC_ZERO_P(mem_ctx, struct ctdbd_connection))) {
+       if (!(conn = talloc_zero(mem_ctx, struct ctdbd_connection))) {
                DEBUG(0, ("talloc failed\n"));
                return NT_STATUS_NO_MEMORY;
        }
                DEBUG(0, ("talloc failed\n"));
                return NT_STATUS_NO_MEMORY;
        }
index d5daba13e59ce0c1fdbf2bb9eb32d400a6bd6cef..935bb03f34c17f50947801bf1f540db57f04bd50 100644 (file)
@@ -1025,7 +1025,7 @@ static struct db_record *fetch_locked_internal(struct db_ctdb_ctx *ctx,
                return NULL;
        }
 
                return NULL;
        }
 
-       if (!(crec = TALLOC_ZERO_P(result, struct db_ctdb_rec))) {
+       if (!(crec = talloc_zero(result, struct db_ctdb_rec))) {
                DEBUG(0, ("talloc failed\n"));
                TALLOC_FREE(result);
                return NULL;
                DEBUG(0, ("talloc failed\n"));
                TALLOC_FREE(result);
                return NULL;
@@ -1365,7 +1365,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
                return NULL;
        }
 
-       if (!(result = TALLOC_ZERO_P(mem_ctx, struct db_context))) {
+       if (!(result = talloc_zero(mem_ctx, struct db_context))) {
                DEBUG(0, ("talloc failed\n"));
                TALLOC_FREE(result);
                return NULL;
                DEBUG(0, ("talloc failed\n"));
                TALLOC_FREE(result);
                return NULL;
index c27df0cdb93ba1822c6243e98f2fc475e3984c2b..6ecd72810deeea1d979e7b1819d7f18018f2007c 100644 (file)
@@ -348,7 +348,7 @@ struct db_context *db_open_file(TALLOC_CTX *mem_ctx,
        struct db_context *result = NULL;
        struct db_file_ctx *ctx;
 
        struct db_context *result = NULL;
        struct db_file_ctx *ctx;
 
-       if (!(result = TALLOC_ZERO_P(mem_ctx, struct db_context))) {
+       if (!(result = talloc_zero(mem_ctx, struct db_context))) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
        }
                DEBUG(0, ("talloc failed\n"));
                return NULL;
        }
index af88c79e6a4fd6a8da6df28a8ec9db9f5358cc14..fd6e988864b7fdf2b99eccb333cdea41c09f25d7 100644 (file)
@@ -400,7 +400,7 @@ struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
                return NULL;
        }
 
                return NULL;
        }
 
-       result->private_data = TALLOC_ZERO_P(result, struct db_rbt_ctx);
+       result->private_data = talloc_zero(result, struct db_rbt_ctx);
 
        if (result->private_data == NULL) {
                TALLOC_FREE(result);
 
        if (result->private_data == NULL) {
                TALLOC_FREE(result);
index 0342725772acf0a3adc89101d296899073f391f6..f8baa0aeca8ff6a67c407c1ad72626fcb25386b7 100644 (file)
@@ -341,7 +341,7 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
        struct db_context *result = NULL;
        struct db_tdb_ctx *db_tdb;
 
        struct db_context *result = NULL;
        struct db_tdb_ctx *db_tdb;
 
-       result = TALLOC_ZERO_P(mem_ctx, struct db_context);
+       result = talloc_zero(mem_ctx, struct db_context);
        if (result == NULL) {
                DEBUG(0, ("talloc failed\n"));
                goto fail;
        if (result == NULL) {
                DEBUG(0, ("talloc failed\n"));
                goto fail;
index 0ff0cb1fa80cdaa5e2b13c2b4da32944d4586928..556938fe1d07f6edb1835737d14adbbb8c67dd19 100644 (file)
@@ -416,7 +416,7 @@ ELOG_TDB *elog_open_tdb( const char *logname, bool force_clear, bool read_only )
                        return ptr;
                }
 
                        return ptr;
                }
 
-               if ( !(tdb_node = TALLOC_ZERO_P( NULL, ELOG_TDB)) ) {
+               if ( !(tdb_node = talloc_zero( NULL, ELOG_TDB)) ) {
                        DEBUG(0,("elog_open_tdb: talloc() failure!\n"));
                        tdb_close( tdb );
                        return NULL;
                        DEBUG(0,("elog_open_tdb: talloc() failure!\n"));
                        tdb_close( tdb );
                        return NULL;
index fc7f1d493a35d0684721b974cad253462f2bead1..f077f585812a5dce4ce5d899618dea1e0e2ad2d5 100644 (file)
@@ -42,7 +42,7 @@ static struct tevent_poll_private *tevent_get_poll_private(
 
        state = (struct tevent_poll_private *)ev->additional_data;
        if (state == NULL) {
 
        state = (struct tevent_poll_private *)ev->additional_data;
        if (state == NULL) {
-               state = TALLOC_ZERO_P(ev, struct tevent_poll_private);
+               state = talloc_zero(ev, struct tevent_poll_private);
                ev->additional_data = (void *)state;
                if (state == NULL) {
                        DEBUG(10, ("talloc failed\n"));
                ev->additional_data = (void *)state;
                if (state == NULL) {
                        DEBUG(10, ("talloc failed\n"));
index 425861ed77ac85c7a3fda38b59d2217be320be0a..88453f32dd8d813dd154e7cf570f57a10cdc38e0 100644 (file)
@@ -72,7 +72,7 @@ struct memcache *memcache_init(TALLOC_CTX *mem_ctx, size_t max_size)
 {
        struct memcache *result;
 
 {
        struct memcache *result;
 
-       result = TALLOC_ZERO_P(mem_ctx, struct memcache);
+       result = talloc_zero(mem_ctx, struct memcache);
        if (result == NULL) {
                return NULL;
        }
        if (result == NULL) {
                return NULL;
        }
index 932d47838d9e0414c83a123cc262a3b122024409..76c1090b8194282fc99473a58f4e79db97aedb8f 100644 (file)
@@ -184,7 +184,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
        struct messaging_context *ctx;
        NTSTATUS status;
 
        struct messaging_context *ctx;
        NTSTATUS status;
 
-       if (!(ctx = TALLOC_ZERO_P(mem_ctx, struct messaging_context))) {
+       if (!(ctx = talloc_zero(mem_ctx, struct messaging_context))) {
                return NULL;
        }
 
                return NULL;
        }
 
index bfed35ffe43d05366276209206801811a8e8afc5..09b8706262127235edc1d5f1d4c548f06cf57827 100644 (file)
@@ -92,7 +92,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
                return NT_STATUS_NO_MEMORY;
        }
 
-       ctx = TALLOC_ZERO_P(result, struct messaging_tdb_context);
+       ctx = talloc_zero(result, struct messaging_tdb_context);
        if (!ctx) {
                DEBUG(0, ("talloc failed\n"));
                TALLOC_FREE(result);
        if (!ctx) {
                DEBUG(0, ("talloc failed\n"));
                TALLOC_FREE(result);
@@ -187,7 +187,7 @@ static NTSTATUS messaging_tdb_fetch(TDB_CONTEXT *msg_tdb,
        DATA_BLOB blob;
        enum ndr_err_code ndr_err;
 
        DATA_BLOB blob;
        enum ndr_err_code ndr_err;
 
-       if (!(result = TALLOC_ZERO_P(mem_ctx, struct messaging_array))) {
+       if (!(result = talloc_zero(mem_ctx, struct messaging_array))) {
                return NT_STATUS_NO_MEMORY;
        }
 
                return NT_STATUS_NO_MEMORY;
        }
 
index 4c9bfcb4197efd2e630c1cf97687cd837c3cbb67..3adb97e3575569a9463b065815f9cd5a54c6aabc 100644 (file)
@@ -122,7 +122,7 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
                return WERR_CAN_NOT_COMPLETE;
        }
 
                return WERR_CAN_NOT_COMPLETE;
        }
 
-       p = TALLOC_ZERO_P(ctx, struct client_ipc_connection);
+       p = talloc_zero(ctx, struct client_ipc_connection);
        if (p == NULL) {
                return WERR_NOMEM;
        }
        if (p == NULL) {
                return WERR_NOMEM;
        }
index 49ba74ec1722bb6a35abab62b7cc85d9302f7dd0..54ec14eb84dec970152180c342557b1ed811140c 100644 (file)
@@ -610,7 +610,7 @@ static WERROR map_buffer_to_alias_info(TALLOC_CTX *mem_ctx,
        struct LOCALGROUP_INFO_1002 *info1002;
        union samr_AliasInfo *info = NULL;
 
        struct LOCALGROUP_INFO_1002 *info1002;
        union samr_AliasInfo *info = NULL;
 
-       info = TALLOC_ZERO_P(mem_ctx, union samr_AliasInfo);
+       info = talloc_zero(mem_ctx, union samr_AliasInfo);
        W_ERROR_HAVE_NO_MEMORY(info);
 
        switch (level) {
        W_ERROR_HAVE_NO_MEMORY(info);
 
        switch (level) {
index 1d349345653e7a3ce2374450456d7b7cf769cb2a..14259864ae2bce4f7fb979b3c74e4bb5a19f2acc 100644 (file)
@@ -37,7 +37,7 @@ static NET_API_STATUS libnetapi_init_private_context(struct libnetapi_ctx *ctx)
                return W_ERROR_V(WERR_INVALID_PARAM);
        }
 
                return W_ERROR_V(WERR_INVALID_PARAM);
        }
 
-       priv = TALLOC_ZERO_P(ctx, struct libnetapi_private_ctx);
+       priv = talloc_zero(ctx, struct libnetapi_private_ctx);
        if (!priv) {
                return W_ERROR_V(WERR_NOMEM);
        }
        if (!priv) {
                return W_ERROR_V(WERR_NOMEM);
        }
index 599ebb7b46e84004894686f34b50dd62e30766e9..92dbcbae1c1aceae934f4e160e4f4176da49f07a 100644 (file)
@@ -259,7 +259,7 @@ static sbcErr smbconf_reg_set_multi_sz_value(struct registry_key *key,
                goto done;
        }
 
                goto done;
        }
 
-       value = TALLOC_ZERO_P(tmp_ctx, struct registry_value);
+       value = talloc_zero(tmp_ctx, struct registry_value);
        if (value == NULL) {
                err = SBC_ERR_NOMEM;
                goto done;
        if (value == NULL) {
                err = SBC_ERR_NOMEM;
                goto done;
@@ -604,7 +604,7 @@ static sbcErr smbconf_reg_init(struct smbconf_ctx *ctx, const char *path)
                goto done;
        }
 
                goto done;
        }
 
-       ctx->data = TALLOC_ZERO_P(ctx, struct reg_private_data);
+       ctx->data = talloc_zero(ctx, struct reg_private_data);
 
        werr = ntstatus_to_werror(registry_create_admin_token(ctx, &token));
        if (!W_ERROR_IS_OK(werr)) {
 
        werr = ntstatus_to_werror(registry_create_admin_token(ctx, &token));
        if (!W_ERROR_IS_OK(werr)) {
@@ -913,7 +913,7 @@ static sbcErr smbconf_reg_get_share(struct smbconf_ctx *ctx,
                goto done;
        }
 
                goto done;
        }
 
-       tmp_service = TALLOC_ZERO_P(tmp_ctx, struct smbconf_service);
+       tmp_service = talloc_zero(tmp_ctx, struct smbconf_service);
        if (tmp_service == NULL) {
                err = SBC_ERR_NOMEM;
                goto done;
        if (tmp_service == NULL) {
                err = SBC_ERR_NOMEM;
                goto done;
index c49788459b4e4a1b8b5a2c060733f98d12a83989..38c7b207f5609a6a082f87f14321c137326142d0 100644 (file)
@@ -1862,7 +1862,7 @@ NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx,
                      const char *location,
                      struct smbldap_state **smbldap_state)
 {
                      const char *location,
                      struct smbldap_state **smbldap_state)
 {
-       *smbldap_state = TALLOC_ZERO_P(mem_ctx, struct smbldap_state);
+       *smbldap_state = talloc_zero(mem_ctx, struct smbldap_state);
        if (!*smbldap_state) {
                DEBUG(0, ("talloc() failed for ldapsam private_data!\n"));
                return NT_STATUS_NO_MEMORY;
        if (!*smbldap_state) {
                DEBUG(0, ("talloc() failed for ldapsam private_data!\n"));
                return NT_STATUS_NO_MEMORY;
index cb0b79a5d30ee9e2c047261f39a7d84da498dc25..6c2802c208d04deea697cdea2bb4d43cd7e3b135 100644 (file)
@@ -34,7 +34,7 @@ struct user_auth_info *user_auth_info_init(TALLOC_CTX *mem_ctx)
 {
        struct user_auth_info *result;
 
 {
        struct user_auth_info *result;
 
-       result = TALLOC_ZERO_P(mem_ctx, struct user_auth_info);
+       result = talloc_zero(mem_ctx, struct user_auth_info);
        if (result == NULL) {
                return NULL;
        }
        if (result == NULL) {
                return NULL;
        }
index 2fd0f088ab714a5ff8311ed50b0372da36abade1..ffa858d77946e717a4c93fff399be6fe55cc25ef 100644 (file)
@@ -39,7 +39,7 @@ struct security_token *dup_nt_token(TALLOC_CTX *mem_ctx, const struct security_t
        if (!ptoken)
                return NULL;
 
        if (!ptoken)
                return NULL;
 
-       token = TALLOC_ZERO_P(mem_ctx, struct security_token);
+       token = talloc_zero(mem_ctx, struct security_token);
        if (token == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
        if (token == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
@@ -80,7 +80,7 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       token = TALLOC_ZERO_P(mem_ctx, struct security_token);
+       token = talloc_zero(mem_ctx, struct security_token);
        NT_STATUS_HAVE_NO_MEMORY(token);
 
        for (i=0; i < token_1->num_sids; i++) {
        NT_STATUS_HAVE_NO_MEMORY(token);
 
        for (i=0; i < token_1->num_sids; i++) {
index 743bf42b1e4e79612f891ce01edad3341f7cc52c..5d75383ccc7f05aa670a0d2dd95b7876607b84a9 100644 (file)
@@ -784,7 +784,7 @@ static struct berval *dup_berval(TALLOC_CTX *ctx, const struct berval *in_val)
 
        if (!in_val) return NULL;
 
 
        if (!in_val) return NULL;
 
-       value = TALLOC_ZERO_P(ctx, struct berval);
+       value = talloc_zero(ctx, struct berval);
        if (value == NULL)
                return NULL;
        if (in_val->bv_len == 0) return value;
        if (value == NULL)
                return NULL;
        if (in_val->bv_len == 0) return value;
@@ -1431,7 +1431,7 @@ static ADS_STATUS ads_modlist_add(TALLOC_CTX *ctx, ADS_MODLIST *mods,
                *mods = (ADS_MODLIST)modlist;
        }
 
                *mods = (ADS_MODLIST)modlist;
        }
 
-       if (!(modlist[curmod] = TALLOC_ZERO_P(ctx, LDAPMod)))
+       if (!(modlist[curmod] = talloc_zero(ctx, LDAPMod)))
                return ADS_ERROR(LDAP_NO_MEMORY);
        modlist[curmod]->mod_type = talloc_strdup(ctx, name);
        if (mod_op & LDAP_MOD_BVALUES) {
                return ADS_ERROR(LDAP_NO_MEMORY);
        modlist[curmod]->mod_type = talloc_strdup(ctx, name);
        if (mod_op & LDAP_MOD_BVALUES) {
index eb49b19b2036287d12d18b8e0d7bffe0b968451b..b0ec7b88d908069a36332beb600f94c132595aa5 100644 (file)
@@ -111,14 +111,14 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx,
 
        ZERO_STRUCTP(*reg_entry);
 
 
        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);
 
        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;
 
        if (!entry)
                return false;
 
@@ -327,7 +327,7 @@ static NTSTATUS registry_get_reg_config(TALLOC_CTX *mem_ctx,
                { NULL, REG_NONE, NULL }
        };
 
                { 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,
        NT_STATUS_HAVE_NO_MEMORY(info);
 
        status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME,
index 3e977378ee499e142795229eecf7aa75c875e6a7..0b6748507a7c820a9ce81584b17816e526429f68 100644 (file)
@@ -62,7 +62,7 @@ static NTSTATUS scripts_get_reg_config(TALLOC_CTX *mem_ctx,
                { NULL, REG_NONE, NULL },
        };
 
                { 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,
        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;
 
        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);
 
        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;
        NT_STATUS_HAVE_NO_MEMORY(data);
 
        data->type = data_type;
index dea0de33f93dde8fb55460e28b2ccdc141b9d9f8..b68840d2f6a8b102ec6d334aa14c04117e9592f9 100644 (file)
@@ -202,7 +202,7 @@ static NTSTATUS security_get_reg_config(TALLOC_CTX *mem_ctx,
                { NULL, REG_NONE, NULL }
        };
 
                { 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,
        NT_STATUS_HAVE_NO_MEMORY(info);
 
        status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME,
index 29b31aec8edec2422755d5cfc26c46aaf297ef55..5142e919cc981e500bda634ab7af4d804b86ec56 100644 (file)
@@ -36,7 +36,7 @@ struct security_token *registry_create_system_token(TALLOC_CTX *mem_ctx)
 {
        struct security_token *token = NULL;
 
 {
        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;
        if (!token) {
                DEBUG(1,("talloc failed\n"));
                return NULL;
@@ -74,7 +74,7 @@ WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
                return werr;
        }
 
                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) {
        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;
 
        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);
        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;
        }
 
                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);
        W_ERROR_HAVE_NO_MEMORY(gpo);
 
        werr = gp_read_reg_gpovals(mem_ctx, key, gpo);
index 47ceff15092a234d3dc309d6ddce488648500479..c768226e8baba6db88dc2cd00df6a36532b4fe6f 100644 (file)
@@ -54,7 +54,7 @@ NTSTATUS libnet_dssync_init_context(TALLOC_CTX *mem_ctx,
 {
        struct dssync_context *ctx;
 
 {
        struct dssync_context *ctx;
 
-       ctx = TALLOC_ZERO_P(mem_ctx, struct dssync_context);
+       ctx = talloc_zero(mem_ctx, struct dssync_context);
        NT_STATUS_HAVE_NO_MEMORY(ctx);
 
        talloc_set_destructor(ctx, libnet_dssync_free_context);
        NT_STATUS_HAVE_NO_MEMORY(ctx);
 
        talloc_set_destructor(ctx, libnet_dssync_free_context);
@@ -339,7 +339,7 @@ static NTSTATUS libnet_dssync_build_request(TALLOC_CTX *mem_ctx,
                level = 5;
        }
 
                level = 5;
        }
 
-       nc = TALLOC_ZERO_P(mem_ctx, struct drsuapi_DsReplicaObjectIdentifier);
+       nc = talloc_zero(mem_ctx, struct drsuapi_DsReplicaObjectIdentifier);
        if (!nc) {
                status = NT_STATUS_NO_MEMORY;
                goto fail;
        if (!nc) {
                status = NT_STATUS_NO_MEMORY;
                goto fail;
@@ -351,7 +351,7 @@ static NTSTATUS libnet_dssync_build_request(TALLOC_CTX *mem_ctx,
        if (!ctx->single_object_replication &&
            !ctx->force_full_replication && utdv)
        {
        if (!ctx->single_object_replication &&
            !ctx->force_full_replication && utdv)
        {
-               cursors = TALLOC_ZERO_P(mem_ctx,
+               cursors = talloc_zero(mem_ctx,
                                         struct drsuapi_DsReplicaCursorCtrEx);
                if (!cursors) {
                        status = NT_STATUS_NO_MEMORY;
                                         struct drsuapi_DsReplicaCursorCtrEx);
                if (!cursors) {
                        status = NT_STATUS_NO_MEMORY;
@@ -442,7 +442,7 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx,
        struct dcerpc_binding_handle *b = ctx->cli->binding_handle;
 
        if (!ctx->single_object_replication) {
        struct dcerpc_binding_handle *b = ctx->cli->binding_handle;
 
        if (!ctx->single_object_replication) {
-               new_utdv = TALLOC_ZERO_P(mem_ctx, struct replUpToDateVectorBlob);
+               new_utdv = talloc_zero(mem_ctx, struct replUpToDateVectorBlob);
                if (!new_utdv) {
                        status = NT_STATUS_NO_MEMORY;
                        goto out;
                if (!new_utdv) {
                        status = NT_STATUS_NO_MEMORY;
                        goto out;
index 6f3ed642260734eced4fd0fcf41636888dbc4a49..06758b4510d40bc407152023202818fa9fc6e757 100644 (file)
@@ -200,7 +200,7 @@ static  NTSTATUS parse_supplemental_credentials(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
                goto done;
        }
 
-       pkb = TALLOC_ZERO_P(mem_ctx, struct package_PrimaryKerberosBlob);
+       pkb = talloc_zero(mem_ctx, struct package_PrimaryKerberosBlob);
        if (!pkb) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
        if (!pkb) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
index f395c975e5cb1c01832d72de8d6484fe75c36d60..6349c2291f7371d232a76e3efc5620930e73879c 100644 (file)
@@ -66,7 +66,7 @@ krb5_error_code libnet_keytab_init(TALLOC_CTX *mem_ctx,
 
        struct libnet_keytab_context *r;
 
 
        struct libnet_keytab_context *r;
 
-       r = TALLOC_ZERO_P(mem_ctx, struct libnet_keytab_context);
+       r = talloc_zero(mem_ctx, struct libnet_keytab_context);
        if (!r) {
                return ENOMEM;
        }
        if (!r) {
                return ENOMEM;
        }
index ee54088cedbde14265978e06c718bdc238d48893..9803c895387bc13cd4a18519e1749ac09e80e101 100644 (file)
@@ -70,7 +70,7 @@ NTSTATUS libnet_samsync_init_context(TALLOC_CTX *mem_ctx,
 
        *ctx_p = NULL;
 
 
        *ctx_p = NULL;
 
-       ctx = TALLOC_ZERO_P(mem_ctx, struct samsync_context);
+       ctx = talloc_zero(mem_ctx, struct samsync_context);
        NT_STATUS_HAVE_NO_MEMORY(ctx);
 
        if (domain_sid) {
        NT_STATUS_HAVE_NO_MEMORY(ctx);
 
        if (domain_sid) {
@@ -404,7 +404,7 @@ NTSTATUS pull_netr_AcctLockStr(TALLOC_CTX *mem_ctx,
 
        *str_p = NULL;
 
 
        *str_p = NULL;
 
-       str = TALLOC_ZERO_P(mem_ctx, struct netr_AcctLockStr);
+       str = talloc_zero(mem_ctx, struct netr_AcctLockStr);
        if (!str) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!str) {
                return NT_STATUS_NO_MEMORY;
        }
index bcdcd48ecf9635186dc3aa73d65b07b561af644d..a8eb3c9d1106c918142e7bb2851a0f4684105084 100644 (file)
@@ -946,7 +946,7 @@ static NTSTATUS ldif_init_context(TALLOC_CTX *mem_ctx,
                return NT_STATUS_OK;
        }
 
                return NT_STATUS_OK;
        }
 
-       r = TALLOC_ZERO_P(mem_ctx, struct samsync_ldif_context);
+       r = talloc_zero(mem_ctx, struct samsync_ldif_context);
        NT_STATUS_HAVE_NO_MEMORY(r);
 
        /* Get the ldap suffix */
        NT_STATUS_HAVE_NO_MEMORY(r);
 
        /* Get the ldap suffix */
index aed03ef3824efffbc53e39ebc6c1cbd0ec5e52ad..c0eb724fbfc2427c67353cbb8305a6c520d12b74 100644 (file)
@@ -227,7 +227,7 @@ static bool parse_getdc_response(
 
        blob = p.smb.body.trans.data;
 
 
        blob = p.smb.body.trans.data;
 
-       r = TALLOC_ZERO_P(mem_ctx, struct netlogon_samlogon_response);
+       r = talloc_zero(mem_ctx, struct netlogon_samlogon_response);
        if (!r) {
                return false;
        }
        if (!r) {
                return false;
        }
index 6bfc3cd08654050b75f83a10bfa767590c3d023f..1122bbbaa507373960c6de2797a78b542b85c128 100644 (file)
@@ -213,7 +213,7 @@ struct cli_state *cli_initialise_ex(int signing_state)
                return NULL;
        }
 
                return NULL;
        }
 
-       cli = TALLOC_ZERO_P(NULL, struct cli_state);
+       cli = talloc_zero(NULL, struct cli_state);
        if (!cli) {
                return NULL;
        }
        if (!cli) {
                return NULL;
        }
index 74430fe0ca0b57d87c768fb83cee4f32cbd8e83f..9136506e48c2307b3188928bedf3669a13ed7665 100644 (file)
@@ -269,13 +269,13 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum,
                        goto cleanup;
                }
 
                        goto cleanup;
                }
 
-               if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) {
+               if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) {
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        talloc_destroy(mem_ctx);
                        return NT_STATUS_NO_MEMORY;
                }
 
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        talloc_destroy(mem_ctx);
                        return NT_STATUS_NO_MEMORY;
                }
 
-               if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) {
+               if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) {
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        talloc_destroy(mem_ctx);
                        return NT_STATUS_NO_MEMORY;
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        talloc_destroy(mem_ctx);
                        return NT_STATUS_NO_MEMORY;
@@ -326,13 +326,13 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum,
                                goto cleanup;
                        }
 
                                goto cleanup;
                        }
 
-                       if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) {
+                       if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) {
                                DEBUG(0,("TALLOC_ZERO() failed\n"));
                                talloc_destroy(mem_ctx);
                                goto cleanup;
                        }
 
                                DEBUG(0,("TALLOC_ZERO() failed\n"));
                                talloc_destroy(mem_ctx);
                                goto cleanup;
                        }
 
-                       if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) {
+                       if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) {
                                DEBUG(0,("TALLOC_ZERO() failed\n"));
                                talloc_destroy(mem_ctx);
                                goto cleanup;
                                DEBUG(0,("TALLOC_ZERO() failed\n"));
                                talloc_destroy(mem_ctx);
                                goto cleanup;
index edcec0bc32b5feeb02f4f34f92b97c9e3d075bd1..c6add7ecdd4502b33992f15a7070ea73705a5b60 100644 (file)
@@ -339,7 +339,7 @@ static NTSTATUS dsgetdcname_cache_fetch(TALLOC_CTX *mem_ctx,
                return NT_STATUS_NOT_FOUND;
        }
 
                return NT_STATUS_NOT_FOUND;
        }
 
-       info = TALLOC_ZERO_P(mem_ctx, struct netr_DsRGetDCNameInfo);
+       info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo);
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -659,7 +659,7 @@ static NTSTATUS make_domain_controller_info(TALLOC_CTX *mem_ctx,
 {
        struct netr_DsRGetDCNameInfo *info;
 
 {
        struct netr_DsRGetDCNameInfo *info;
 
-       info = TALLOC_ZERO_P(mem_ctx, struct netr_DsRGetDCNameInfo);
+       info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo);
        NT_STATUS_HAVE_NO_MEMORY(info);
 
        if (dc_unc) {
        NT_STATUS_HAVE_NO_MEMORY(info);
 
        if (dc_unc) {
@@ -963,7 +963,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
                {
                        struct NETLOGON_SAM_LOGON_RESPONSE_NT40 logon1;
 
                {
                        struct NETLOGON_SAM_LOGON_RESPONSE_NT40 logon1;
 
-                       r = TALLOC_ZERO_P(mem_ctx, struct netlogon_samlogon_response);
+                       r = talloc_zero(mem_ctx, struct netlogon_samlogon_response);
                        NT_STATUS_HAVE_NO_MEMORY(r);
 
                        ZERO_STRUCT(logon1);
                        NT_STATUS_HAVE_NO_MEMORY(r);
 
                        ZERO_STRUCT(logon1);
index a07ea5280aed0a54c3858ed7d131a602a52aa269..67c0e08114a2f19a485fdd1553f6d0df2f1ff94c 100644 (file)
@@ -217,7 +217,7 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do
                return NULL;
        }
 
                return NULL;
        }
 
-       info3 = TALLOC_ZERO_P(mem_ctx, struct netr_SamInfo3);
+       info3 = talloc_zero(mem_ctx, struct netr_SamInfo3);
        if (!info3) {
                goto done;
        }
        if (!info3) {
                goto done;
        }
index 1b1d8cb12928833ae8a20fa1d531050fb0d0bccb..cf9ed7dbc6dfdbc9ef1d64bfe12f70fb5cb4098f 100644 (file)
@@ -73,7 +73,7 @@ NTSTATUS nb_packet_server_create(TALLOC_CTX *mem_ctx,
        struct tevent_fd *fde;
        NTSTATUS status;
 
        struct tevent_fd *fde;
        NTSTATUS status;
 
-       result = TALLOC_ZERO_P(mem_ctx, struct nb_packet_server);
+       result = talloc_zero(mem_ctx, struct nb_packet_server);
        if (result == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto fail;
        if (result == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto fail;
@@ -140,7 +140,7 @@ static void nb_packet_server_listener(struct tevent_context *ev,
        }
        DEBUG(6,("accepted socket %d\n", sock));
 
        }
        DEBUG(6,("accepted socket %d\n", sock));
 
-       client = TALLOC_ZERO_P(server, struct nb_packet_client);
+       client = talloc_zero(server, struct nb_packet_client);
        if (client == NULL) {
                DEBUG(10, ("talloc failed\n"));
                close(sock);
        if (client == NULL) {
                DEBUG(10, ("talloc failed\n"));
                close(sock);
@@ -378,7 +378,7 @@ static void nb_packet_client_send(struct nb_packet_client *client,
                return;
        }
 
                return;
        }
 
-       state = TALLOC_ZERO_P(client, struct nb_packet_client_state);
+       state = talloc_zero(client, struct nb_packet_client_state);
        if (state == NULL) {
                DEBUG(10, ("talloc failed\n"));
                return;
        if (state == NULL) {
                DEBUG(10, ("talloc failed\n"));
                return;
@@ -485,7 +485,7 @@ struct tevent_req *nb_packet_reader_send(TALLOC_CTX *mem_ctx,
                state->query.mailslot_namelen = strlen(mailslot_name);
        }
 
                state->query.mailslot_namelen = strlen(mailslot_name);
        }
 
-       state->reader = TALLOC_ZERO_P(state, struct nb_packet_reader);
+       state->reader = talloc_zero(state, struct nb_packet_reader);
        if (tevent_req_nomem(state->reader, req)) {
                return tevent_req_post(req, ev);
        }
        if (tevent_req_nomem(state->reader, req)) {
                return tevent_req_post(req, ev);
        }
index 9a9fd157892f95716e05b30d6320acccebccc0aa..f82d8733647a8ebf6d7eb816ed9efab94087b04b 100644 (file)
@@ -2020,7 +2020,7 @@ static void brl_revalidate(struct messaging_context *msg_ctx,
        uint32 i;
        struct server_id last_pid;
 
        uint32 i;
        struct server_id last_pid;
 
-       if (!(state = TALLOC_ZERO_P(NULL, struct brl_revalidate_state))) {
+       if (!(state = talloc_zero(NULL, struct brl_revalidate_state))) {
                DEBUG(0, ("talloc failed\n"));
                return;
        }
                DEBUG(0, ("talloc failed\n"));
                return;
        }
index 153f3da585b42e7377ac9c42b0ffe907df38acf5..91dff565d30408129c783b453c851f1f0d796d78 100644 (file)
@@ -579,7 +579,7 @@ static int parse_delete_tokens_list(struct share_mode_lock *lck,
 
                p += sizeof(token_len);
 
 
                p += sizeof(token_len);
 
-               pdtl = TALLOC_ZERO_P(lck, struct delete_token_list);
+               pdtl = talloc_zero(lck, struct delete_token_list);
                if (pdtl == NULL) {
                        DEBUG(0,("parse_delete_tokens_list: talloc failed"));
                        return -1;
                if (pdtl == NULL) {
                        DEBUG(0,("parse_delete_tokens_list: talloc failed"));
                        return -1;
@@ -588,7 +588,7 @@ static int parse_delete_tokens_list(struct share_mode_lock *lck,
                memcpy(&pdtl->name_hash, p, sizeof(pdtl->name_hash));
                p += sizeof(pdtl->name_hash);
 
                memcpy(&pdtl->name_hash, p, sizeof(pdtl->name_hash));
                p += sizeof(pdtl->name_hash);
 
-               pdtl->delete_token = TALLOC_ZERO_P(pdtl, struct security_unix_token);
+               pdtl->delete_token = talloc_zero(pdtl, struct security_unix_token);
                if (pdtl->delete_token == NULL) {
                        DEBUG(0,("parse_delete_tokens_list: talloc failed"));
                        return -1;
                if (pdtl->delete_token == NULL) {
                        DEBUG(0,("parse_delete_tokens_list: talloc failed"));
                        return -1;
@@ -1513,7 +1513,7 @@ static bool add_delete_on_close_token(struct share_mode_lock *lck,
 {
        struct delete_token_list *dtl;
 
 {
        struct delete_token_list *dtl;
 
-       dtl = TALLOC_ZERO_P(lck, struct delete_token_list);
+       dtl = talloc_zero(lck, struct delete_token_list);
        if (dtl == NULL) {
                return false;
        }
        if (dtl == NULL) {
                return false;
        }
index fdf32f6c20e777f3ada99edccf09ead1a7920890..961efd85de2996d3b321dfdb7d3f446c8c2fbe11 100644 (file)
@@ -277,7 +277,7 @@ static struct aio_child_list *init_aio_children(struct vfs_handle_struct *handle
        }
 
        if (data == NULL) {
        }
 
        if (data == NULL) {
-               data = TALLOC_ZERO_P(NULL, struct aio_child_list);
+               data = talloc_zero(NULL, struct aio_child_list);
                if (data == NULL) {
                        return NULL;
                }
                if (data == NULL) {
                        return NULL;
                }
@@ -481,7 +481,7 @@ static NTSTATUS create_aio_child(struct smbd_server_connection *sconn,
 
        fdpair[0] = fdpair[1] = -1;
 
 
        fdpair[0] = fdpair[1] = -1;
 
-       result = TALLOC_ZERO_P(children, struct aio_child);
+       result = talloc_zero(children, struct aio_child);
        NT_STATUS_HAVE_NO_MEMORY(result);
 
        if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) == -1) {
        NT_STATUS_HAVE_NO_MEMORY(result);
 
        if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) == -1) {
index bf7dacdc1f0d0240a08d2ca17ed8c10ca60d12a2..e8129f41436acd101cf2bb4cc29e3973550e58f1 100644 (file)
@@ -611,7 +611,7 @@ static int smb_full_audit_connect(vfs_handle_struct *handle,
                return result;
        }
 
                return result;
        }
 
-       pd = TALLOC_ZERO_P(handle, struct vfs_full_audit_private_data);
+       pd = talloc_zero(handle, struct vfs_full_audit_private_data);
        if (!pd) {
                SMB_VFS_NEXT_DISCONNECT(handle);
                return -1;
        if (!pd) {
                SMB_VFS_NEXT_DISCONNECT(handle);
                return -1;
index 462932ddb22aea01ad1586a2297d193d04beb564..ddce7e7dc5efa4eb27a444d5947e74fca7c82d3c 100644 (file)
@@ -666,7 +666,7 @@ static int smb_traffic_analyzer_connect(struct vfs_handle_struct *handle,
                rf_sock->ref_count++;
        } else {
                /* New connection. */
                rf_sock->ref_count++;
        } else {
                /* New connection. */
-               rf_sock = TALLOC_ZERO_P(NULL, struct refcounted_sock);
+               rf_sock = talloc_zero(NULL, struct refcounted_sock);
                if (rf_sock == NULL) {
                        SMB_VFS_NEXT_DISCONNECT(handle);
                        errno = ENOMEM;
                if (rf_sock == NULL) {
                        SMB_VFS_NEXT_DISCONNECT(handle);
                        errno = ENOMEM;
index d53d2918322e083b1e834124943d484266642529..e9fd83bfea764b1b88b02f228de9582a4cf62ccf 100644 (file)
@@ -97,7 +97,7 @@ static int tsmsm_connect(struct vfs_handle_struct *handle,
                return ret;
        }
 
                return ret;
        }
 
-       tsmd = TALLOC_ZERO_P(handle, struct tsmsm_struct);
+       tsmd = talloc_zero(handle, struct tsmsm_struct);
        if (!tsmd) {
                SMB_VFS_NEXT_DISCONNECT(handle);
                DEBUG(0,("tsmsm_connect: out of memory!\n"));
        if (!tsmd) {
                SMB_VFS_NEXT_DISCONNECT(handle);
                DEBUG(0,("tsmsm_connect: out of memory!\n"));
index 23bb35041ee3ef23e2dd8a32c2cce9072ab99780..200450b1310597f8ccfa44997359da497aef78e7 100644 (file)
@@ -41,7 +41,7 @@ static NTSTATUS xattr_tdb_pull_attrs(TALLOC_CTX *mem_ctx,
        enum ndr_err_code ndr_err;
        struct tdb_xattrs *result;
 
        enum ndr_err_code ndr_err;
        struct tdb_xattrs *result;
 
-       if (!(result = TALLOC_ZERO_P(mem_ctx, struct tdb_xattrs))) {
+       if (!(result = talloc_zero(mem_ctx, struct tdb_xattrs))) {
                return NT_STATUS_NO_MEMORY;
        }
 
                return NT_STATUS_NO_MEMORY;
        }
 
index 25cdcc697090046925b8dec8c09dfdc3faa31d2a..89adf5a48d4a83481507475e29d3819a15c3045f 100644 (file)
@@ -173,7 +173,7 @@ static void nmbd_proxy_logon(struct nmbd_proxy_logon_context *ctx,
        fstring source_name;
        struct dgram_packet *dgram = &p->packet.dgram;
 
        fstring source_name;
        struct dgram_packet *dgram = &p->packet.dgram;
 
-       state = TALLOC_ZERO_P(ctx, struct nmbd_proxy_logon_state);
+       state = talloc_zero(ctx, struct nmbd_proxy_logon_state);
        if (!state) {
                DEBUG(0,("failed to allocate nmbd_proxy_logon_state\n"));
                return;
        if (!state) {
                DEBUG(0,("failed to allocate nmbd_proxy_logon_state\n"));
                return;
index 992f1b8741c8ddf8956f9a8f2aaa16b75eef89b2..fcdaf272c8d45c6cb1fef44db1f1dfd7e6dcadfe 100644 (file)
@@ -74,7 +74,7 @@ struct samu *samu_new( TALLOC_CTX *ctx )
 {
        struct samu *user;
 
 {
        struct samu *user;
 
-       if ( !(user = TALLOC_ZERO_P( ctx, struct samu )) ) {
+       if ( !(user = talloc_zero( ctx, struct samu )) ) {
                DEBUG(0,("samuser_new: Talloc failed!\n"));
                return NULL;
        }
                DEBUG(0,("samuser_new: Talloc failed!\n"));
                return NULL;
        }
index 2d33d2d954435bc4c0798111041cb3f364c07f6c..f8da0ff25539102ad9d373628a30208641eb6cf1 100644 (file)
@@ -6480,7 +6480,7 @@ static NTSTATUS pdb_init_ldapsam_common(struct pdb_methods **pdb_method, const c
 
        /* TODO: Setup private data and free */
 
 
        /* TODO: Setup private data and free */
 
-       if ( !(ldap_state = TALLOC_ZERO_P(*pdb_method, struct ldapsam_privates)) ) {
+       if ( !(ldap_state = talloc_zero(*pdb_method, struct ldapsam_privates)) ) {
                DEBUG(0, ("pdb_init_ldapsam_common: talloc() failed for ldapsam private_data!\n"));
                return NT_STATUS_NO_MEMORY;
        }
                DEBUG(0, ("pdb_init_ldapsam_common: talloc() failed for ldapsam private_data!\n"));
                return NT_STATUS_NO_MEMORY;
        }
index 73dc0a5c6b1b97037d4256325d3aff5b9e4c194d..2cfacd3a13628d7f81268fef80f9ca3b26481243 100644 (file)
@@ -1694,7 +1694,7 @@ static NTSTATUS pdb_init_smbpasswd( struct pdb_methods **pdb_method, const char
 
        /* Setup private data and free function */
 
 
        /* Setup private data and free function */
 
-       if ( !(privates = TALLOC_ZERO_P( *pdb_method, struct smbpasswd_privates )) ) {
+       if ( !(privates = talloc_zero( *pdb_method, struct smbpasswd_privates )) ) {
                DEBUG(0, ("talloc() failed for smbpasswd private_data!\n"));
                return NT_STATUS_NO_MEMORY;
        }
                DEBUG(0, ("talloc() failed for smbpasswd private_data!\n"));
                return NT_STATUS_NO_MEMORY;
        }
index 76fb6fd6dee4f39be703b3f134e9a01a764edeee..45d4191ae7692f7e52af490636a6e248b263daa3 100644 (file)
@@ -919,7 +919,7 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
                }
 
                /* Setup a synthetic smb_filename struct */
                }
 
                /* Setup a synthetic smb_filename struct */
-               smb_fname_new = TALLOC_ZERO_P(mem_ctx, struct smb_filename);
+               smb_fname_new = talloc_zero(mem_ctx, struct smb_filename);
                if (!smb_fname_new) {
                        ret = WERR_NOMEM;
                        goto out;
                if (!smb_fname_new) {
                        ret = WERR_NOMEM;
                        goto out;
index 150a3ab02d40789d61b98180e15cd22749b37b63..51bd98e9395becb5bd16804923e10031448356ee 100644 (file)
@@ -142,9 +142,9 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx,
 
        SMB_ASSERT(strchr(name, '\\') == NULL);
 
 
        SMB_ASSERT(strchr(name, '\\') == NULL);
 
-       if (!(regkey = TALLOC_ZERO_P(mem_ctx, struct registry_key)) ||
+       if (!(regkey = talloc_zero(mem_ctx, struct registry_key)) ||
            !(regkey->token = dup_nt_token(regkey, token)) ||
            !(regkey->token = dup_nt_token(regkey, token)) ||
-           !(regkey->key = TALLOC_ZERO_P(regkey, struct registry_key_handle)))
+           !(regkey->key = talloc_zero(regkey, struct registry_key_handle)))
        {
                result = WERR_NOMEM;
                goto done;
        {
                result = WERR_NOMEM;
                goto done;
index a2ae178783275230045c2fb48adb32d5896f1c4b..54b6fe344131338cd99d255c134388fd8266fdf7 100644 (file)
@@ -62,7 +62,7 @@ struct regsubkey_ctr {
  context for internal private data.
 
  There is no longer a regval_ctr_intit() and regval_ctr_destroy()
  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.
 
  **********************************************************************/
  object.
 
  **********************************************************************/
index ca0159a6491322dedc7f1c07c3b33f13a7cc6e65..d599b3a33dd073ae8eeb99ad87776ad7396f0784 100644 (file)
@@ -38,7 +38,7 @@ NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       token = TALLOC_ZERO_P(mem_ctx, struct security_token);
+       token = talloc_zero(mem_ctx, struct security_token);
        if (token == NULL) {
                DEBUG(1, ("talloc failed\n"));
                status = NT_STATUS_NO_MEMORY;
        if (token == NULL) {
                DEBUG(1, ("talloc failed\n"));
                status = NT_STATUS_NO_MEMORY;
index 925ff8775a647f4fe9607e4313fc9eb51ce5fc81..c1d40166ccd74973fa080dd6cf8f96541b324d8d 100644 (file)
@@ -498,7 +498,7 @@ static REGF_HBIN* read_hbin_block( REGF_FILE *file, off_t offset )
        REGF_HBIN *hbin;
        uint32 record_size, curr_off, block_size, header;
        
        REGF_HBIN *hbin;
        uint32 record_size, curr_off, block_size, header;
        
-       if ( !(hbin = TALLOC_ZERO_P(file->mem_ctx, REGF_HBIN)) ) 
+       if ( !(hbin = talloc_zero(file->mem_ctx, REGF_HBIN)) ) 
                return NULL;
        hbin->file_off = offset;
        hbin->free_off = -1;
                return NULL;
        hbin->file_off = offset;
        hbin->free_off = -1;
@@ -1073,7 +1073,7 @@ static bool hbin_prs_key( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk )
                        }
                }
                
                        }
                }
                
-               if ( !(nk->sec_desc = TALLOC_ZERO_P( file->mem_ctx, REGF_SK_REC )) )
+               if ( !(nk->sec_desc = talloc_zero( file->mem_ctx, REGF_SK_REC )) )
                        return False;
                nk->sec_desc->sk_off = nk->sk_off;
                if ( !hbin_prs_sk_rec( "sk_rec", sub_hbin, depth, nk->sec_desc ))
                        return False;
                nk->sec_desc->sk_off = nk->sk_off;
                if ( !hbin_prs_sk_rec( "sk_rec", sub_hbin, depth, nk->sec_desc ))
@@ -1379,7 +1379,7 @@ REGF_NK_REC* regfio_rootkey( REGF_FILE *file )
        if ( !file )
                return NULL;
                
        if ( !file )
                return NULL;
                
-       if ( !(nk = TALLOC_ZERO_P( file->mem_ctx, REGF_NK_REC )) ) {
+       if ( !(nk = talloc_zero( file->mem_ctx, REGF_NK_REC )) ) {
                DEBUG(0,("regfio_rootkey: talloc() failed!\n"));
                return NULL;
        }
                DEBUG(0,("regfio_rootkey: talloc() failed!\n"));
                return NULL;
        }
@@ -1447,7 +1447,7 @@ REGF_NK_REC* regfio_rootkey( REGF_FILE *file )
                return NULL;
                
        nk->subkey_index++;
                return NULL;
                
        nk->subkey_index++;
-       if ( !(subkey = TALLOC_ZERO_P( file->mem_ctx, REGF_NK_REC )) )
+       if ( !(subkey = talloc_zero( file->mem_ctx, REGF_NK_REC )) )
                return NULL;
                
        if ( !hbin_prs_key( file, hbin, subkey ) )
                return NULL;
                
        if ( !hbin_prs_key( file, hbin, subkey ) )
@@ -1465,7 +1465,7 @@ static REGF_HBIN* regf_hbin_allocate( REGF_FILE *file, uint32 block_size )
        REGF_HBIN *hbin;
        SMB_STRUCT_STAT sbuf;
 
        REGF_HBIN *hbin;
        SMB_STRUCT_STAT sbuf;
 
-       if ( !(hbin = TALLOC_ZERO_P( file->mem_ctx, REGF_HBIN )) )
+       if ( !(hbin = talloc_zero( file->mem_ctx, REGF_HBIN )) )
                return NULL;
 
        memcpy( hbin->header, "hbin", sizeof(HBIN_HDR_SIZE) );
                return NULL;
 
        memcpy( hbin->header, "hbin", sizeof(HBIN_HDR_SIZE) );
@@ -1765,7 +1765,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 )
        REGF_HBIN *vlist_hbin = NULL;
        uint32 size;
 
        REGF_HBIN *vlist_hbin = NULL;
        uint32 size;
 
-       if ( !(nk = TALLOC_ZERO_P( file->mem_ctx, REGF_NK_REC )) )
+       if ( !(nk = talloc_zero( file->mem_ctx, REGF_NK_REC )) )
                return NULL;
 
        memcpy( nk->header, "nk", REC_HDR_SIZE );
                return NULL;
 
        memcpy( nk->header, "nk", REC_HDR_SIZE );
@@ -1831,7 +1831,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 )
                                return NULL;
                        }
 
                                return NULL;
                        }
 
-                       if ( !(nk->sec_desc = TALLOC_ZERO_P( file->mem_ctx, REGF_SK_REC )) )
+                       if ( !(nk->sec_desc = talloc_zero( file->mem_ctx, REGF_SK_REC )) )
                                return NULL;
        
                        /* now we have to store the security descriptor in the list and 
                                return NULL;
        
                        /* now we have to store the security descriptor in the list and 
index bd3232d2cde4955652ba62b702302f1ddea1c3f7..b5193585586433f49f4091d2d3720305ea0c33d5 100644 (file)
@@ -177,7 +177,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
 
        ZERO_STRUCT(ret_creds);
 
 
        ZERO_STRUCT(ret_creds);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
+       logon = talloc_zero(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -200,7 +200,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
                struct samr_Password lmpassword;
                struct samr_Password ntpassword;
 
                struct samr_Password lmpassword;
                struct samr_Password ntpassword;
 
-               password_info = TALLOC_ZERO_P(mem_ctx, struct netr_PasswordInfo);
+               password_info = talloc_zero(mem_ctx, struct netr_PasswordInfo);
                if (!password_info) {
                        return NT_STATUS_NO_MEMORY;
                }
                if (!password_info) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -240,7 +240,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
                ZERO_STRUCT(lm);
                ZERO_STRUCT(nt);
 
                ZERO_STRUCT(lm);
                ZERO_STRUCT(nt);
 
-               network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo);
+               network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo);
                if (!network_info) {
                        return NT_STATUS_NO_MEMORY;
                }
                if (!network_info) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -388,12 +388,12 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
+       logon = talloc_zero(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
 
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
 
-       network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo);
+       network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo);
        if (!network_info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!network_info) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -505,12 +505,12 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
+       logon = talloc_zero(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
 
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
 
-       network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo);
+       network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo);
        if (!network_info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!network_info) {
                return NT_STATUS_NO_MEMORY;
        }
index 76d2cf164b0aa5a7d3c3a4b85bdd031bff23505d..682f35ece07634a0200ad552f308e0dc96410ead 100644 (file)
@@ -2431,7 +2431,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
        NTSTATUS status;
        int fd;
 
        NTSTATUS status;
        int fd;
 
-       result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client);
+       result = talloc_zero(mem_ctx, struct rpc_pipe_client);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -2540,7 +2540,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
 
        /* create tower for asking the epmapper */
 
 
        /* create tower for asking the epmapper */
 
-       map_binding = TALLOC_ZERO_P(tmp_ctx, struct dcerpc_binding);
+       map_binding = talloc_zero(tmp_ctx, struct dcerpc_binding);
        if (map_binding == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
        if (map_binding == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
@@ -2551,7 +2551,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
        map_binding->host = host; /* needed? */
        map_binding->endpoint = "0"; /* correct? needed? */
 
        map_binding->host = host; /* needed? */
        map_binding->endpoint = "0"; /* correct? needed? */
 
-       map_tower = TALLOC_ZERO_P(tmp_ctx, struct epm_twr_t);
+       map_tower = talloc_zero(tmp_ctx, struct epm_twr_t);
        if (map_tower == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
        if (map_tower == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
@@ -2572,7 +2572,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
        }
        towers.twr = res_towers;
 
        }
        towers.twr = res_towers;
 
-       entry_handle = TALLOC_ZERO_P(tmp_ctx, struct policy_handle);
+       entry_handle = talloc_zero(tmp_ctx, struct policy_handle);
        if (entry_handle == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
        if (entry_handle == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
@@ -2756,7 +2756,7 @@ static NTSTATUS rpc_pipe_open_np(struct cli_state *cli,
                return NT_STATUS_INVALID_HANDLE;
        }
 
                return NT_STATUS_INVALID_HANDLE;
        }
 
-       result = TALLOC_ZERO_P(NULL, struct rpc_pipe_client);
+       result = talloc_zero(NULL, struct rpc_pipe_client);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 723760d601e121d59896026b1d9914c8ef9b06a0..486e14e268b5cb64c99b69b67066988e23bc3549 100644 (file)
@@ -59,7 +59,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
                return WERR_ACCESS_DENIED;
        }
 
                return WERR_ACCESS_DENIED;
        }
 
-       jn = TALLOC_ZERO_P(ctx, struct junction_map);
+       jn = talloc_zero(ctx, struct junction_map);
        if (!jn) {
                return WERR_NOMEM;
        }
        if (!jn) {
                return WERR_NOMEM;
        }
@@ -124,7 +124,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
                return WERR_ACCESS_DENIED;
        }
 
                return WERR_ACCESS_DENIED;
        }
 
-       jn = TALLOC_ZERO_P(ctx, struct junction_map);
+       jn = talloc_zero(ctx, struct junction_map);
        if (!jn) {
                return WERR_NOMEM;
        }
        if (!jn) {
                return WERR_NOMEM;
        }
@@ -354,7 +354,7 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
        TALLOC_CTX *ctx = talloc_tos();
        bool ret;
 
        TALLOC_CTX *ctx = talloc_tos();
        bool ret;
 
-       jn = TALLOC_ZERO_P(ctx, struct junction_map);
+       jn = talloc_zero(ctx, struct junction_map);
        if (!jn) {
                return WERR_NOMEM;
        }
        if (!jn) {
                return WERR_NOMEM;
        }
@@ -372,28 +372,28 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
 
        switch (r->in.level) {
                case 1:
 
        switch (r->in.level) {
                case 1:
-                       r->out.info->info1 = TALLOC_ZERO_P(ctx,struct dfs_Info1);
+                       r->out.info->info1 = talloc_zero(ctx,struct dfs_Info1);
                        if (!r->out.info->info1) {
                                return WERR_NOMEM;
                        }
                        ret = init_reply_dfs_info_1(ctx, jn, r->out.info->info1);
                        break;
                case 2:
                        if (!r->out.info->info1) {
                                return WERR_NOMEM;
                        }
                        ret = init_reply_dfs_info_1(ctx, jn, r->out.info->info1);
                        break;
                case 2:
-                       r->out.info->info2 = TALLOC_ZERO_P(ctx,struct dfs_Info2);
+                       r->out.info->info2 = talloc_zero(ctx,struct dfs_Info2);
                        if (!r->out.info->info2) {
                                return WERR_NOMEM;
                        }
                        ret = init_reply_dfs_info_2(ctx, jn, r->out.info->info2);
                        break;
                case 3:
                        if (!r->out.info->info2) {
                                return WERR_NOMEM;
                        }
                        ret = init_reply_dfs_info_2(ctx, jn, r->out.info->info2);
                        break;
                case 3:
-                       r->out.info->info3 = TALLOC_ZERO_P(ctx,struct dfs_Info3);
+                       r->out.info->info3 = talloc_zero(ctx,struct dfs_Info3);
                        if (!r->out.info->info3) {
                                return WERR_NOMEM;
                        }
                        ret = init_reply_dfs_info_3(ctx, jn, r->out.info->info3);
                        break;
                case 100:
                        if (!r->out.info->info3) {
                                return WERR_NOMEM;
                        }
                        ret = init_reply_dfs_info_3(ctx, jn, r->out.info->info3);
                        break;
                case 100:
-                       r->out.info->info100 = TALLOC_ZERO_P(ctx,struct dfs_Info100);
+                       r->out.info->info100 = talloc_zero(ctx,struct dfs_Info100);
                        if (!r->out.info->info100) {
                                return WERR_NOMEM;
                        }
                        if (!r->out.info->info100) {
                                return WERR_NOMEM;
                        }
index d90ad421371b95f4f7166eba9d00ba20f0aaa6f7..1cf4ab80746f07f9c0a0402e35e598c03292501a 100644 (file)
@@ -42,7 +42,7 @@ static WERROR fill_dsrole_dominfo_basic(TALLOC_CTX *ctx,
 
        DEBUG(10,("fill_dsrole_dominfo_basic: enter\n"));
 
 
        DEBUG(10,("fill_dsrole_dominfo_basic: enter\n"));
 
-       basic = TALLOC_ZERO_P(ctx, struct dssetup_DsRolePrimaryDomInfoBasic);
+       basic = talloc_zero(ctx, struct dssetup_DsRolePrimaryDomInfoBasic);
        if (!basic) {
                DEBUG(0,("fill_dsrole_dominfo_basic: out of memory\n"));
                return WERR_NOMEM;
        if (!basic) {
                DEBUG(0,("fill_dsrole_dominfo_basic: out of memory\n"));
                return WERR_NOMEM;
index b4c59ba51749cd830094654f8234cfd81e5d9bf2..16a0c97488190a22148fbb0575c0c42231e9a98a 100644 (file)
@@ -212,7 +212,7 @@ static NTSTATUS elog_open( struct pipes_struct * p, const char *logname, struct
        if ( !elog_validate_logname( logname ) )
                return NT_STATUS_OBJECT_PATH_INVALID;
 
        if ( !elog_validate_logname( logname ) )
                return NT_STATUS_OBJECT_PATH_INVALID;
 
-       if ( !(elog = TALLOC_ZERO_P( NULL, EVENTLOG_INFO )) )
+       if ( !(elog = talloc_zero( NULL, EVENTLOG_INFO )) )
                return NT_STATUS_NO_MEMORY;
        talloc_set_destructor(elog, eventlog_info_destructor);
 
                return NT_STATUS_NO_MEMORY;
        talloc_set_destructor(elog, eventlog_info_destructor);
 
index 48cec6309421698c84aad8a8140886df6fef405e..cb9eae297c87bc3ac8743a8cebd6af13c5fec163 100644 (file)
@@ -628,7 +628,7 @@ NTSTATUS _lsa_QueryInfoPolicy(struct pipes_struct *p,
                /* return NT_STATUS_ACCESS_DENIED; */
        }
 
                /* return NT_STATUS_ACCESS_DENIED; */
        }
 
-       info = TALLOC_ZERO_P(p->mem_ctx, union lsa_PolicyInformation);
+       info = talloc_zero(p->mem_ctx, union lsa_PolicyInformation);
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -859,7 +859,7 @@ static NTSTATUS _lsa_lookup_sids_internal(struct pipes_struct *p,
        }
 
        sids = talloc_array(p->mem_ctx, const struct dom_sid *, num_sids);
        }
 
        sids = talloc_array(p->mem_ctx, const struct dom_sid *, num_sids);
-       ref = TALLOC_ZERO_P(p->mem_ctx, struct lsa_RefDomainList);
+       ref = talloc_zero(p->mem_ctx, struct lsa_RefDomainList);
 
        if (sids == NULL || ref == NULL) {
                return NT_STATUS_NO_MEMORY;
 
        if (sids == NULL || ref == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -1168,7 +1168,7 @@ NTSTATUS _lsa_LookupNames(struct pipes_struct *p,
 
        flags = lsa_lookup_level_to_flags(r->in.level);
 
 
        flags = lsa_lookup_level_to_flags(r->in.level);
 
-       domains = TALLOC_ZERO_P(p->mem_ctx, struct lsa_RefDomainList);
+       domains = talloc_zero(p->mem_ctx, struct lsa_RefDomainList);
        if (!domains) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!domains) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -1235,7 +1235,7 @@ NTSTATUS _lsa_LookupNames2(struct pipes_struct *p,
        struct lsa_TransSidArray *sid_array = NULL;
        uint32_t i;
 
        struct lsa_TransSidArray *sid_array = NULL;
        uint32_t i;
 
-       sid_array = TALLOC_ZERO_P(p->mem_ctx, struct lsa_TransSidArray);
+       sid_array = talloc_zero(p->mem_ctx, struct lsa_TransSidArray);
        if (!sid_array) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!sid_array) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -1310,7 +1310,7 @@ NTSTATUS _lsa_LookupNames3(struct pipes_struct *p,
                flags = LOOKUP_NAME_ALL;
        }
 
                flags = LOOKUP_NAME_ALL;
        }
 
-       domains = TALLOC_ZERO_P(p->mem_ctx, struct lsa_RefDomainList);
+       domains = talloc_zero(p->mem_ctx, struct lsa_RefDomainList);
        if (!domains) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!domains) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -2012,7 +2012,7 @@ NTSTATUS _lsa_QueryTrustedDomainInfo(struct pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       info = TALLOC_ZERO_P(p->mem_ctx, union lsa_TrustedDomainInfo);
+       info = talloc_zero(p->mem_ctx, union lsa_TrustedDomainInfo);
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -2299,7 +2299,7 @@ NTSTATUS _lsa_LookupPrivDisplayName(struct pipes_struct *p,
 
        DEBUG(10,("_lsa_LookupPrivDisplayName: display name = %s\n", description));
 
 
        DEBUG(10,("_lsa_LookupPrivDisplayName: display name = %s\n", description));
 
-       lsa_name = TALLOC_ZERO_P(p->mem_ctx, struct lsa_StringLarge);
+       lsa_name = talloc_zero(p->mem_ctx, struct lsa_StringLarge);
        if (!lsa_name) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!lsa_name) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -2597,7 +2597,7 @@ NTSTATUS _lsa_EnumPrivsAccount(struct pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       *r->out.privs = priv_set = TALLOC_ZERO_P(p->mem_ctx, struct lsa_PrivilegeSet);
+       *r->out.privs = priv_set = talloc_zero(p->mem_ctx, struct lsa_PrivilegeSet);
        if (!priv_set) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!priv_set) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -2801,7 +2801,7 @@ NTSTATUS _lsa_LookupPrivName(struct pipes_struct *p,
                return NT_STATUS_NO_SUCH_PRIVILEGE;
        }
 
                return NT_STATUS_NO_SUCH_PRIVILEGE;
        }
 
-       lsa_name = TALLOC_ZERO_P(p->mem_ctx, struct lsa_StringLarge);
+       lsa_name = talloc_zero(p->mem_ctx, struct lsa_StringLarge);
        if (!lsa_name) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!lsa_name) {
                return NT_STATUS_NO_MEMORY;
        }
index e3c95fc06bc421b8ee9f712246c7c288ce0c0452..46789f106a4ea55194f8c722ae9622edb43f380a 100644 (file)
@@ -346,7 +346,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
 
        switch (r->in.level) {
        case 1:
 
        switch (r->in.level) {
        case 1:
-               info1 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_1);
+               info1 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_1);
                W_ERROR_HAVE_NO_MEMORY(info1);
 
                info1->flags                    = flags;
                W_ERROR_HAVE_NO_MEMORY(info1);
 
                info1->flags                    = flags;
@@ -355,7 +355,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
                r->out.query->info1 = info1;
                break;
        case 2:
                r->out.query->info1 = info1;
                break;
        case 2:
-               info2 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_2);
+               info2 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_2);
                W_ERROR_HAVE_NO_MEMORY(info2);
 
                info2->flags                    = flags;
                W_ERROR_HAVE_NO_MEMORY(info2);
 
                info2->flags                    = flags;
@@ -366,7 +366,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
                r->out.query->info2 = info2;
                break;
        case 3:
                r->out.query->info2 = info2;
                break;
        case 3:
-               info3 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_3);
+               info3 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_3);
                W_ERROR_HAVE_NO_MEMORY(info3);
 
                info3->flags                    = flags;
                W_ERROR_HAVE_NO_MEMORY(info3);
 
                info3->flags                    = flags;
@@ -375,7 +375,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
                r->out.query->info3 = info3;
                break;
        case 4:
                r->out.query->info3 = info3;
                break;
        case 4:
-               info4 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_4);
+               info4 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_4);
                W_ERROR_HAVE_NO_MEMORY(info4);
 
                info4->trusted_dc_name          = dc_name;
                W_ERROR_HAVE_NO_MEMORY(info4);
 
                info4->trusted_dc_name          = dc_name;
@@ -1421,19 +1421,19 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
 
        switch (r->in.validation_level) {
        case 2:
 
        switch (r->in.validation_level) {
        case 2:
-               r->out.validation->sam2 = TALLOC_ZERO_P(p->mem_ctx, struct netr_SamInfo2);
+               r->out.validation->sam2 = talloc_zero(p->mem_ctx, struct netr_SamInfo2);
                if (!r->out.validation->sam2) {
                        return NT_STATUS_NO_MEMORY;
                }
                break;
        case 3:
                if (!r->out.validation->sam2) {
                        return NT_STATUS_NO_MEMORY;
                }
                break;
        case 3:
-               r->out.validation->sam3 = TALLOC_ZERO_P(p->mem_ctx, struct netr_SamInfo3);
+               r->out.validation->sam3 = talloc_zero(p->mem_ctx, struct netr_SamInfo3);
                if (!r->out.validation->sam3) {
                        return NT_STATUS_NO_MEMORY;
                }
                break;
        case 6:
                if (!r->out.validation->sam3) {
                        return NT_STATUS_NO_MEMORY;
                }
                break;
        case 6:
-               r->out.validation->sam6 = TALLOC_ZERO_P(p->mem_ctx, struct netr_SamInfo6);
+               r->out.validation->sam6 = talloc_zero(p->mem_ctx, struct netr_SamInfo6);
                if (!r->out.validation->sam6) {
                        return NT_STATUS_NO_MEMORY;
                }
                if (!r->out.validation->sam6) {
                        return NT_STATUS_NO_MEMORY;
                }
index e578c77ddab5a1b801f5607a124fa2457fa5e2a1..f14aae540d3118b6f6920182a7fc18c370eb93ba 100644 (file)
@@ -131,7 +131,7 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
        DEBUG(4,("Create pipe requested %s\n",
                 get_pipe_name_from_syntax(talloc_tos(), syntax)));
 
        DEBUG(4,("Create pipe requested %s\n",
                 get_pipe_name_from_syntax(talloc_tos(), syntax)));
 
-       p = TALLOC_ZERO_P(mem_ctx, struct pipes_struct);
+       p = talloc_zero(mem_ctx, struct pipes_struct);
 
        if (!p) {
                DEBUG(0,("ERROR! no memory for pipes_struct!\n"));
 
        if (!p) {
                DEBUG(0,("ERROR! no memory for pipes_struct!\n"));
@@ -563,7 +563,7 @@ static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
        struct rpc_pipe_client *result;
        NTSTATUS status;
 
        struct rpc_pipe_client *result;
        NTSTATUS status;
 
-       result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client);
+       result = talloc_zero(mem_ctx, struct rpc_pipe_client);
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 186526edfc2669b3e2a1efd56dd1b663123943b2..9f96127c0f37d45830b321956c2be0e4e8390b9c 100644 (file)
@@ -842,7 +842,7 @@ NTSTATUS _samr_EnumDomainUsers(struct pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       samr_array = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray);
+       samr_array = talloc_zero(p->mem_ctx, struct samr_SamArray);
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -977,7 +977,7 @@ NTSTATUS _samr_EnumDomainGroups(struct pipes_struct *p,
 
        DEBUG(5,("_samr_EnumDomainGroups: %d\n", __LINE__));
 
 
        DEBUG(5,("_samr_EnumDomainGroups: %d\n", __LINE__));
 
-       samr_array = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray);
+       samr_array = talloc_zero(p->mem_ctx, struct samr_SamArray);
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -1055,7 +1055,7 @@ NTSTATUS _samr_EnumDomainAliases(struct pipes_struct *p,
        DEBUG(5,("_samr_EnumDomainAliases: sid %s\n",
                 sid_string_dbg(&dinfo->sid)));
 
        DEBUG(5,("_samr_EnumDomainAliases: sid %s\n",
                 sid_string_dbg(&dinfo->sid)));
 
-       samr_array = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray);
+       samr_array = talloc_zero(p->mem_ctx, struct samr_SamArray);
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -1578,7 +1578,7 @@ NTSTATUS _samr_QueryAliasInfo(struct pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       alias_info = TALLOC_ZERO_P(p->mem_ctx, union samr_AliasInfo);
+       alias_info = talloc_zero(p->mem_ctx, union samr_AliasInfo);
        if (!alias_info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!alias_info) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -1984,12 +1984,12 @@ NTSTATUS _samr_ChangePasswordUser3(struct pipes_struct *p,
                time_t u_expire, u_min_age;
                uint32 account_policy_temp;
 
                time_t u_expire, u_min_age;
                uint32 account_policy_temp;
 
-               dominfo = TALLOC_ZERO_P(p->mem_ctx, struct samr_DomInfo1);
+               dominfo = talloc_zero(p->mem_ctx, struct samr_DomInfo1);
                if (!dominfo) {
                        return NT_STATUS_NO_MEMORY;
                }
 
                if (!dominfo) {
                        return NT_STATUS_NO_MEMORY;
                }
 
-               reject = TALLOC_ZERO_P(p->mem_ctx,
+               reject = talloc_zero(p->mem_ctx,
                                struct userPwdChangeFailureInformation);
                if (!reject) {
                        return NT_STATUS_NO_MEMORY;
                                struct userPwdChangeFailureInformation);
                if (!reject) {
                        return NT_STATUS_NO_MEMORY;
@@ -2288,7 +2288,7 @@ static NTSTATUS init_samr_parameters_string(TALLOC_CTX *mem_ctx,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       r = TALLOC_ZERO_P(mem_ctx, struct lsa_BinaryString);
+       r = talloc_zero(mem_ctx, struct lsa_BinaryString);
        if (!r) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!r) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -2987,7 +2987,7 @@ NTSTATUS _samr_QueryUserInfo(struct pipes_struct *p,
        DEBUG(5,("_samr_QueryUserInfo: sid:%s\n",
                 sid_string_dbg(&uinfo->sid)));
 
        DEBUG(5,("_samr_QueryUserInfo: sid:%s\n",
                 sid_string_dbg(&uinfo->sid)));
 
-       user_info = TALLOC_ZERO_P(p->mem_ctx, union samr_UserInfo);
+       user_info = talloc_zero(p->mem_ctx, union samr_UserInfo);
        if (!user_info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!user_info) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -3149,7 +3149,7 @@ NTSTATUS _samr_GetGroupsForUser(struct pipes_struct *p,
                return result;
        }
 
                return result;
        }
 
-       rids = TALLOC_ZERO_P(p->mem_ctx, struct samr_RidWithAttributeArray);
+       rids = talloc_zero(p->mem_ctx, struct samr_RidWithAttributeArray);
        if (!rids) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!rids) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -3598,7 +3598,7 @@ NTSTATUS _samr_QueryDomainInfo(struct pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       dom_info = TALLOC_ZERO_P(p->mem_ctx, union samr_DomainInfo);
+       dom_info = talloc_zero(p->mem_ctx, union samr_DomainInfo);
        if (!dom_info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!dom_info) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -4054,7 +4054,7 @@ NTSTATUS _samr_LookupDomain(struct pipes_struct *p,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       sid = TALLOC_ZERO_P(p->mem_ctx, struct dom_sid2);
+       sid = talloc_zero(p->mem_ctx, struct dom_sid2);
        if (!sid) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!sid) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -4095,7 +4095,7 @@ NTSTATUS _samr_EnumDomains(struct pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       sam = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray);
+       sam = talloc_zero(p->mem_ctx, struct samr_SamArray);
        if (!sam) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!sam) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -5415,7 +5415,7 @@ NTSTATUS _samr_QueryGroupMember(struct pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       rids = TALLOC_ZERO_P(p->mem_ctx, struct samr_RidAttrArray);
+       rids = talloc_zero(p->mem_ctx, struct samr_RidAttrArray);
        if (!rids) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!rids) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -5954,7 +5954,7 @@ NTSTATUS _samr_QueryGroupInfo(struct pipes_struct *p,
        group_name = talloc_strdup(r, map.nt_name);
        group_description = talloc_strdup(r, map.comment);
 
        group_name = talloc_strdup(r, map.nt_name);
        group_description = talloc_strdup(r, map.comment);
 
-       info = TALLOC_ZERO_P(p->mem_ctx, union samr_GroupInfo);
+       info = talloc_zero(p->mem_ctx, union samr_GroupInfo);
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!info) {
                return NT_STATUS_NO_MEMORY;
        }
index 228cb96cc04dc1a2c3654984aedd380bae1a6273..7fd068f1af5b0b6841bc8c753532054ef09d99d8 100644 (file)
@@ -600,7 +600,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
        alloc_entries = num_entries - resume_handle;
        switch (info_ctr->level) {
        case 0:
        alloc_entries = num_entries - resume_handle;
        switch (info_ctr->level) {
        case 0:
-               ctr.ctr0 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr0);
+               ctr.ctr0 = talloc_zero(ctx, struct srvsvc_NetShareCtr0);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr0);
 
                ctr.ctr0->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr0);
 
                ctr.ctr0->count = alloc_entries;
@@ -617,7 +617,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 1:
                break;
 
        case 1:
-               ctr.ctr1 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1);
+               ctr.ctr1 = talloc_zero(ctx, struct srvsvc_NetShareCtr1);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1);
 
                ctr.ctr1->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1);
 
                ctr.ctr1->count = alloc_entries;
@@ -634,7 +634,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 2:
                break;
 
        case 2:
-               ctr.ctr2 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr2);
+               ctr.ctr2 = talloc_zero(ctx, struct srvsvc_NetShareCtr2);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr2);
 
                ctr.ctr2->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr2);
 
                ctr.ctr2->count = alloc_entries;
@@ -651,7 +651,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 501:
                break;
 
        case 501:
-               ctr.ctr501 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr501);
+               ctr.ctr501 = talloc_zero(ctx, struct srvsvc_NetShareCtr501);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr501);
 
                ctr.ctr501->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr501);
 
                ctr.ctr501->count = alloc_entries;
@@ -668,7 +668,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 502:
                break;
 
        case 502:
-               ctr.ctr502 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr502);
+               ctr.ctr502 = talloc_zero(ctx, struct srvsvc_NetShareCtr502);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr502);
 
                ctr.ctr502->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr502);
 
                ctr.ctr502->count = alloc_entries;
@@ -685,7 +685,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 1004:
                break;
 
        case 1004:
-               ctr.ctr1004 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1004);
+               ctr.ctr1004 = talloc_zero(ctx, struct srvsvc_NetShareCtr1004);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1004);
 
                ctr.ctr1004->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1004);
 
                ctr.ctr1004->count = alloc_entries;
@@ -702,7 +702,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 1005:
                break;
 
        case 1005:
-               ctr.ctr1005 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1005);
+               ctr.ctr1005 = talloc_zero(ctx, struct srvsvc_NetShareCtr1005);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1005);
 
                ctr.ctr1005->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1005);
 
                ctr.ctr1005->count = alloc_entries;
@@ -719,7 +719,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 1006:
                break;
 
        case 1006:
-               ctr.ctr1006 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1006);
+               ctr.ctr1006 = talloc_zero(ctx, struct srvsvc_NetShareCtr1006);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1006);
 
                ctr.ctr1006->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1006);
 
                ctr.ctr1006->count = alloc_entries;
@@ -736,7 +736,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 1007:
                break;
 
        case 1007:
-               ctr.ctr1007 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1007);
+               ctr.ctr1007 = talloc_zero(ctx, struct srvsvc_NetShareCtr1007);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1007);
 
                ctr.ctr1007->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1007);
 
                ctr.ctr1007->count = alloc_entries;
@@ -753,7 +753,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
                break;
 
        case 1501:
                break;
 
        case 1501:
-               ctr.ctr1501 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1501);
+               ctr.ctr1501 = talloc_zero(ctx, struct srvsvc_NetShareCtr1501);
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1501);
 
                ctr.ctr1501->count = alloc_entries;
                W_ERROR_HAVE_NO_MEMORY(ctr.ctr1501);
 
                ctr.ctr1501->count = alloc_entries;
@@ -2062,7 +2062,7 @@ WERROR _srvsvc_NetRemoteTOD(struct pipes_struct *p,
 
        DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
 
 
        DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
 
-       if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) )
+       if ( !(tod = talloc_zero(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) )
                return WERR_NOMEM;
 
        *r->out.info = tod;
                return WERR_NOMEM;
 
        *r->out.info = tod;
@@ -2189,7 +2189,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
 
        sd_size = ndr_size_security_descriptor(psd, 0);
 
 
        sd_size = ndr_size_security_descriptor(psd, 0);
 
-       sd_buf = TALLOC_ZERO_P(p->mem_ctx, struct sec_desc_buf);
+       sd_buf = talloc_zero(p->mem_ctx, struct sec_desc_buf);
        if (!sd_buf) {
                werr = WERR_NOMEM;
                goto error_exit;
        if (!sd_buf) {
                werr = WERR_NOMEM;
                goto error_exit;
index b2b8a1923d7d4beb3224dfff422d9275d27be0bf..96ac399e1653735ea997242836ffe66813aaa197 100644 (file)
@@ -209,7 +209,7 @@ static WERROR create_open_service_handle(struct pipes_struct *p,
        WERROR result = WERR_OK;
        struct service_control_op *s_op;
 
        WERROR result = WERR_OK;
        struct service_control_op *s_op;
 
-       if ( !(info = TALLOC_ZERO_P( NULL, SERVICE_INFO )) )
+       if ( !(info = talloc_zero( NULL, SERVICE_INFO )) )
                return WERR_NOMEM;
 
        /* the Service Manager has a NULL name */
                return WERR_NOMEM;
 
        /* the Service Manager has a NULL name */
index 1f9130fecf8c36749700ebadf77a8c27c1cca4aa..db2926b4a4f3a41ff579d2152820d276a2f7aaff 100644 (file)
@@ -116,7 +116,7 @@ static struct aio_extra *create_aio_extra(TALLOC_CTX *mem_ctx,
                                        files_struct *fsp,
                                        size_t buflen)
 {
                                        files_struct *fsp,
                                        size_t buflen)
 {
-       struct aio_extra *aio_ex = TALLOC_ZERO_P(mem_ctx, struct aio_extra);
+       struct aio_extra *aio_ex = talloc_zero(mem_ctx, struct aio_extra);
 
        if (!aio_ex) {
                return NULL;
 
        if (!aio_ex) {
                return NULL;
index 4e9ab91eaebca263f7a961b44d0d86a819d2e0dc..a3f66b36be7f5b50e614354edcf3aca544c9e57a 100644 (file)
@@ -133,7 +133,7 @@ connection_struct *conn_new(struct smbd_server_connection *sconn)
 
        if (sconn->using_smb2) {
                /* SMB2 */
 
        if (sconn->using_smb2) {
                /* SMB2 */
-               if (!(conn=TALLOC_ZERO_P(NULL, connection_struct)) ||
+               if (!(conn=talloc_zero(NULL, connection_struct)) ||
                    !(conn->params = talloc(conn, struct share_params))) {
                        DEBUG(0,("TALLOC_ZERO() failed!\n"));
                        TALLOC_FREE(conn);
                    !(conn->params = talloc(conn, struct share_params))) {
                        DEBUG(0,("TALLOC_ZERO() failed!\n"));
                        TALLOC_FREE(conn);
@@ -188,7 +188,7 @@ find_again:
                return NULL;
        }
 
                return NULL;
        }
 
-       if (!(conn=TALLOC_ZERO_P(NULL, connection_struct)) ||
+       if (!(conn=talloc_zero(NULL, connection_struct)) ||
            !(conn->params = talloc(conn, struct share_params))) {
                DEBUG(0,("TALLOC_ZERO() failed!\n"));
                TALLOC_FREE(conn);
            !(conn->params = talloc(conn, struct share_params))) {
                DEBUG(0,("TALLOC_ZERO() failed!\n"));
                TALLOC_FREE(conn);
index 9969693e7b861e063c2e5c160d797d1bdb141d50..83590ea6c00508935cae6bb3f79ca30dbca3c0f1 100644 (file)
@@ -1342,7 +1342,7 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
                        const char *mask,
                        uint32 attr)
 {
                        const char *mask,
                        uint32 attr)
 {
-       struct smb_Dir *dirp = TALLOC_ZERO_P(mem_ctx, struct smb_Dir);
+       struct smb_Dir *dirp = talloc_zero(mem_ctx, struct smb_Dir);
        struct smbd_server_connection *sconn = conn->sconn;
 
        if (!dirp) {
        struct smbd_server_connection *sconn = conn->sconn;
 
        if (!dirp) {
@@ -1386,7 +1386,7 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
                        const char *mask,
                        uint32 attr)
 {
                        const char *mask,
                        uint32 attr)
 {
-       struct smb_Dir *dirp = TALLOC_ZERO_P(mem_ctx, struct smb_Dir);
+       struct smb_Dir *dirp = talloc_zero(mem_ctx, struct smb_Dir);
        struct smbd_server_connection *sconn = conn->sconn;
 
        if (!dirp) {
        struct smbd_server_connection *sconn = conn->sconn;
 
        if (!dirp) {
index 1877582d53bd4ef6b35b7028642c226c40073beb..63b08e126203148718bd3552f9a82b797ba26566 100644 (file)
@@ -202,7 +202,7 @@ void reply_sendstrt(struct smb_request *req)
 
        TALLOC_FREE(smbd_msg_state);
 
 
        TALLOC_FREE(smbd_msg_state);
 
-       smbd_msg_state = TALLOC_ZERO_P(NULL, struct msg_state);
+       smbd_msg_state = talloc_zero(NULL, struct msg_state);
 
        if (smbd_msg_state == NULL) {
                reply_nterror(req, NT_STATUS_NO_MEMORY);
 
        if (smbd_msg_state == NULL) {
                reply_nterror(req, NT_STATUS_NO_MEMORY);
index 2ae01a95ab97bff7440292c8b82b14201b87e940..af560ed19b432ccaeb76d3e1b070831c397242de 100644 (file)
@@ -231,7 +231,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
        char *oldcwd;
        const char *vfs_user;
 
        char *oldcwd;
        const char *vfs_user;
 
-       conn = TALLOC_ZERO_P(ctx, connection_struct);
+       conn = talloc_zero(ctx, connection_struct);
        if (conn == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (conn == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -252,7 +252,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
 
        /* needed for smbd_vfs_init() */
 
 
        /* needed for smbd_vfs_init() */
 
-       if (!(conn->params = TALLOC_ZERO_P(conn, struct share_params))) {
+       if (!(conn->params = talloc_zero(conn, struct share_params))) {
                DEBUG(0, ("TALLOC failed\n"));
                TALLOC_FREE(conn);
                return NT_STATUS_NO_MEMORY;
                DEBUG(0, ("TALLOC failed\n"));
                TALLOC_FREE(conn);
                return NT_STATUS_NO_MEMORY;
@@ -794,7 +794,7 @@ static NTSTATUS self_ref(TALLOC_CTX *ctx,
        *self_referralp = True;
 
        jucn->referral_count = 1;
        *self_referralp = True;
 
        jucn->referral_count = 1;
-       if((ref = TALLOC_ZERO_P(ctx, struct referral)) == NULL) {
+       if((ref = talloc_zero(ctx, struct referral)) == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
 
                return NT_STATUS_NO_MEMORY;
        }
 
@@ -899,7 +899,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
                 */
 
                jucn->referral_count = 1;
                 */
 
                jucn->referral_count = 1;
-               if ((ref = TALLOC_ZERO_P(ctx, struct referral)) == NULL) {
+               if ((ref = talloc_zero(ctx, struct referral)) == NULL) {
                        TALLOC_FREE(pdp);
                        return NT_STATUS_NO_MEMORY;
                }
                        TALLOC_FREE(pdp);
                        return NT_STATUS_NO_MEMORY;
                }
@@ -1233,7 +1233,7 @@ int setup_dfs_referral(connection_struct *orig_conn,
                pathnamep++;
        }
 
                pathnamep++;
        }
 
-       junction = TALLOC_ZERO_P(ctx, struct junction_map);
+       junction = talloc_zero(ctx, struct junction_map);
        if (!junction) {
                *pstatus = NT_STATUS_NO_MEMORY;
                talloc_destroy(ctx);
        if (!junction) {
                *pstatus = NT_STATUS_NO_MEMORY;
                talloc_destroy(ctx);
@@ -1630,7 +1630,7 @@ static int form_junctions(TALLOC_CTX *ctx,
        jucn[cnt].comment = "";
        jucn[cnt].referral_count = 1;
 
        jucn[cnt].comment = "";
        jucn[cnt].referral_count = 1;
 
-       ref = jucn[cnt].referral_list = TALLOC_ZERO_P(ctx, struct referral);
+       ref = jucn[cnt].referral_list = talloc_zero(ctx, struct referral);
        if (jucn[cnt].referral_list == NULL) {
                goto out;
        }
        if (jucn[cnt].referral_list == NULL) {
                goto out;
        }
index a70f86df007b486f1e2e9e5fd95ef70bbab96c49..8160d5ac63881e56e6b6fd45a413c67671cb69bf 100644 (file)
@@ -183,7 +183,7 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
 
        SMB_ASSERT(fsp->notify == NULL);
 
 
        SMB_ASSERT(fsp->notify == NULL);
 
-       if (!(fsp->notify = TALLOC_ZERO_P(NULL, struct notify_change_buf))) {
+       if (!(fsp->notify = talloc_zero(NULL, struct notify_change_buf))) {
                DEBUG(0, ("talloc failed\n"));
                return NT_STATUS_NO_MEMORY;
        }
                DEBUG(0, ("talloc failed\n"));
                return NT_STATUS_NO_MEMORY;
        }
index 30985022182c93bb00e64b12ff68e5b41d8a1843..3aea1625eb6923f2303b45b03e0f749ada1be572 100644 (file)
@@ -198,7 +198,7 @@ static NTSTATUS notify_load(struct notify_context *notify, struct db_record *rec
        notify->seqnum = seqnum;
 
        talloc_free(notify->array);
        notify->seqnum = seqnum;
 
        talloc_free(notify->array);
-       notify->array = TALLOC_ZERO_P(notify, struct notify_array);
+       notify->array = talloc_zero(notify, struct notify_array);
        NT_STATUS_HAVE_NO_MEMORY(notify->array);
 
        if (!rec) {
        NT_STATUS_HAVE_NO_MEMORY(notify->array);
 
        if (!rec) {
@@ -531,7 +531,7 @@ NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0,
 
        depth = count_chars(e.path, '/');
 
 
        depth = count_chars(e.path, '/');
 
-       listel = TALLOC_ZERO_P(notify, struct notify_list);
+       listel = talloc_zero(notify, struct notify_list);
        if (listel == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
        if (listel == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
index cdd08904e4eea3bd4712487a519a4e320893bc5f..1f4fc2d0a215aa73d5aa72ed0da9fb30ac906b41 100644 (file)
@@ -201,14 +201,14 @@ int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list)
                DEBUG(15,("quota entry for id[%s] path[%s]\n",
                          sid_string_dbg(&sid), fsp->conn->connectpath));
 
                DEBUG(15,("quota entry for id[%s] path[%s]\n",
                          sid_string_dbg(&sid), fsp->conn->connectpath));
 
-               if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) {
+               if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) {
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        *qt_list = NULL;
                        talloc_destroy(mem_ctx);
                        return (-1);
                }
 
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        *qt_list = NULL;
                        talloc_destroy(mem_ctx);
                        return (-1);
                }
 
-               if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) {
+               if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) {
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        *qt_list = NULL;
                        talloc_destroy(mem_ctx);
                        DEBUG(0,("TALLOC_ZERO() failed\n"));
                        *qt_list = NULL;
                        talloc_destroy(mem_ctx);
@@ -241,7 +241,7 @@ void *init_quota_handle(TALLOC_CTX *mem_ctx)
        if (!mem_ctx)
                return False;
 
        if (!mem_ctx)
                return False;
 
-       qt_handle = TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_HANDLE);
+       qt_handle = talloc_zero(mem_ctx,SMB_NTQUOTA_HANDLE);
        if (qt_handle==NULL) {
                DEBUG(0,("TALLOC_ZERO() failed\n"));
                return NULL;
        if (qt_handle==NULL) {
                DEBUG(0,("TALLOC_ZERO() failed\n"));
                return NULL;
index f0873a6b9c9754924dfc5da26fa4e911c99ebc3e..5fdb07d769a0e46fc1f0f5135d6153ba6b8e260c 100644 (file)
@@ -2235,7 +2235,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
                        labels = True;
                }
 
                        labels = True;
                }
 
-               shadow_data = TALLOC_ZERO_P(talloc_tos(),
+               shadow_data = talloc_zero(talloc_tos(),
                                            struct shadow_copy_data);
                if (shadow_data == NULL) {
                        DEBUG(0,("TALLOC_ZERO() failed!\n"));
                                            struct shadow_copy_data);
                if (shadow_data == NULL) {
                        DEBUG(0,("TALLOC_ZERO() failed!\n"));
index aebe64e2d81c3a5fe885309908137d894b6cf464..c536306e2241803aea682d3271124dbd3ea1fa1e 100644 (file)
@@ -4744,7 +4744,7 @@ struct security_descriptor *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fna
        struct fd_handle fh;
        NTSTATUS status;
 
        struct fd_handle fh;
        NTSTATUS status;
 
-       conn = TALLOC_ZERO_P(ctx, connection_struct);
+       conn = talloc_zero(ctx, connection_struct);
        if (conn == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
        if (conn == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return NULL;
index 78beb730b961a9571863543853c1e46056e97616..75fa69782e5a608a58c8a97edda6b83c8679d98a 100644 (file)
@@ -594,7 +594,7 @@ static bool push_queued_message(struct smb_request *req,
        int msg_len = smb_len(req->inbuf) + 4;
        struct pending_message_list *msg;
 
        int msg_len = smb_len(req->inbuf) + 4;
        struct pending_message_list *msg;
 
-       msg = TALLOC_ZERO_P(NULL, struct pending_message_list);
+       msg = talloc_zero(NULL, struct pending_message_list);
 
        if(msg == NULL) {
                DEBUG(0,("push_message: malloc fail (1)\n"));
 
        if(msg == NULL) {
                DEBUG(0,("push_message: malloc fail (1)\n"));
index 48487428de50a419e8574c48c8213cd5f6fa3e2a..a5b8326626c3d7e76165fc50bdf52ac3917e00a5 100644 (file)
@@ -411,7 +411,7 @@ static struct tevent_req *smbd_smb2_ioctl_send(TALLOC_CTX *mem_ctx,
                        labels = True;
                }
 
                        labels = True;
                }
 
-               shadow_data = TALLOC_ZERO_P(talloc_tos(),
+               shadow_data = talloc_zero(talloc_tos(),
                                            struct shadow_copy_data);
                if (tevent_req_nomem(shadow_data, req)) {
                        DEBUG(0,("TALLOC_ZERO() failed!\n"));
                                            struct shadow_copy_data);
                if (tevent_req_nomem(shadow_data, req)) {
                        DEBUG(0,("TALLOC_ZERO() failed!\n"));
index 6d85edf9eb68eff30cd4d3e1d2fee58074ef643e..92ac78c6e9027ab0e8abb5ea59e5fe9846b1219e 100644 (file)
@@ -590,7 +590,7 @@ static struct ea_list *read_ea_name_list(TALLOC_CTX *ctx, const char *pdata, siz
        size_t converted_size, offset = 0;
 
        while (offset + 2 < data_size) {
        size_t converted_size, offset = 0;
 
        while (offset + 2 < data_size) {
-               struct ea_list *eal = TALLOC_ZERO_P(ctx, struct ea_list);
+               struct ea_list *eal = talloc_zero(ctx, struct ea_list);
                unsigned int namelen = CVAL(pdata,offset);
 
                offset++; /* Go past the namelen byte. */
                unsigned int namelen = CVAL(pdata,offset);
 
                offset++; /* Go past the namelen byte. */
@@ -628,7 +628,7 @@ static struct ea_list *read_ea_name_list(TALLOC_CTX *ctx, const char *pdata, siz
 
 struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used)
 {
 
 struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used)
 {
-       struct ea_list *eal = TALLOC_ZERO_P(ctx, struct ea_list);
+       struct ea_list *eal = talloc_zero(ctx, struct ea_list);
        uint16 val_len;
        unsigned int namelen;
        size_t converted_size;
        uint16 val_len;
        unsigned int namelen;
        size_t converted_size;
index 8c526fa8821bbd81d1e0d7d0240a63e1b2d0f057..7be386726780da7a19033893d69449848c8717ef 100644 (file)
@@ -183,7 +183,7 @@ bool vfs_init_custom(connection_struct *conn, const char *vfs_object)
 
        DEBUGADD(5,("Successfully loaded vfs module [%s] with the new modules system\n", vfs_object));
 
 
        DEBUGADD(5,("Successfully loaded vfs module [%s] with the new modules system\n", vfs_object));
 
-       handle = TALLOC_ZERO_P(conn, vfs_handle_struct);
+       handle = talloc_zero(conn, vfs_handle_struct);
        if (!handle) {
                DEBUG(0,("TALLOC_ZERO() failed!\n"));
                goto fail;
        if (!handle) {
                DEBUG(0,("TALLOC_ZERO() failed!\n"));
                goto fail;
index 572fec1f42ce8e55071624688ea91f9496dcc00d..490dd2bd529ac31b2fcd38bfbf31c7ccbb580ec0 100644 (file)
@@ -469,7 +469,7 @@ int main(int argc, char *argv[])
 
        /* some basic initialization stuff */
        sec_init();
 
        /* some basic initialization stuff */
        sec_init();
-       vfs.conn = TALLOC_ZERO_P(NULL, connection_struct);
+       vfs.conn = talloc_zero(NULL, connection_struct);
        vfs.conn->params = talloc(vfs.conn, struct share_params);
        for (i=0; i < 1024; i++)
                vfs.files[i] = NULL;
        vfs.conn->params = talloc(vfs.conn, struct share_params);
        for (i=0; i < 1024; i++)
                vfs.files[i] = NULL;
index 849eec3a67b91deb53f8ffe078e5cba3bfc9124b..26aed240a1839042a36bbf723b631fc2e87c7597 100644 (file)
@@ -3431,7 +3431,7 @@ static WERROR get_share_info(struct net_context *c,
        {
                struct srvsvc_NetShareCtr1 *ctr1;
 
        {
                struct srvsvc_NetShareCtr1 *ctr1;
 
-               ctr1 = TALLOC_ZERO_P(mem_ctx, struct srvsvc_NetShareCtr1);
+               ctr1 = talloc_zero(mem_ctx, struct srvsvc_NetShareCtr1);
                W_ERROR_HAVE_NO_MEMORY(ctr1);
 
                ctr1->count = 1;
                W_ERROR_HAVE_NO_MEMORY(ctr1);
 
                ctr1->count = 1;
@@ -3445,7 +3445,7 @@ static WERROR get_share_info(struct net_context *c,
        {
                struct srvsvc_NetShareCtr2 *ctr2;
 
        {
                struct srvsvc_NetShareCtr2 *ctr2;
 
-               ctr2 = TALLOC_ZERO_P(mem_ctx, struct srvsvc_NetShareCtr2);
+               ctr2 = talloc_zero(mem_ctx, struct srvsvc_NetShareCtr2);
                W_ERROR_HAVE_NO_MEMORY(ctr2);
 
                ctr2->count = 1;
                W_ERROR_HAVE_NO_MEMORY(ctr2);
 
                ctr2->count = 1;
@@ -3459,7 +3459,7 @@ static WERROR get_share_info(struct net_context *c,
        {
                struct srvsvc_NetShareCtr502 *ctr502;
 
        {
                struct srvsvc_NetShareCtr502 *ctr502;
 
-               ctr502 = TALLOC_ZERO_P(mem_ctx, struct srvsvc_NetShareCtr502);
+               ctr502 = talloc_zero(mem_ctx, struct srvsvc_NetShareCtr502);
                W_ERROR_HAVE_NO_MEMORY(ctr502);
 
                ctr502->count = 1;
                W_ERROR_HAVE_NO_MEMORY(ctr502);
 
                ctr502->count = 1;
index 77b15a45c7b4d5395f4b5959d18a611b916c4a91..929273dd79e9684b1149cd9f0d027560c917a35d 100644 (file)
@@ -1451,7 +1451,7 @@ static NTSTATUS rpc_registry_getsd_internal(struct net_context *c,
                return status;
        }
 
                return status;
        }
 
-       sd = TALLOC_ZERO_P(mem_ctx, struct KeySecurityData);
+       sd = talloc_zero(mem_ctx, struct KeySecurityData);
        if (!sd) {
                status = NT_STATUS_NO_MEMORY;
                goto out;
        if (!sd) {
                status = NT_STATUS_NO_MEMORY;
                goto out;
index cf15f038ca0caf40cdaf7a022bc9844772d04ad7..65b518074b5f970773a4692b1eafd8d353f1cc70 100644 (file)
@@ -216,7 +216,7 @@ static NTSTATUS idmap_ad_initialize(struct idmap_domain *dom)
        char *config_option;
        const char *schema_mode = NULL; 
 
        char *config_option;
        const char *schema_mode = NULL; 
 
-       ctx = TALLOC_ZERO_P(dom, struct idmap_ad_context);
+       ctx = talloc_zero(dom, struct idmap_ad_context);
        if (ctx == NULL) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
        if (ctx == NULL) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
@@ -736,7 +736,7 @@ static NTSTATUS nss_ad_generic_init(struct nss_domain_entry *e,
        if (e->state != NULL) {
                dom = talloc_get_type(e->state, struct idmap_domain);
        } else {
        if (e->state != NULL) {
                dom = talloc_get_type(e->state, struct idmap_domain);
        } else {
-               dom = TALLOC_ZERO_P(e, struct idmap_domain);
+               dom = talloc_zero(e, struct idmap_domain);
                if (dom == NULL) {
                        DEBUG(0, ("Out of memory!\n"));
                        return NT_STATUS_NO_MEMORY;
                if (dom == NULL) {
                        DEBUG(0, ("Out of memory!\n"));
                        return NT_STATUS_NO_MEMORY;
@@ -756,7 +756,7 @@ static NTSTATUS nss_ad_generic_init(struct nss_domain_entry *e,
                ctx = talloc_get_type(dom->private_data,
                                      struct idmap_ad_context);
        } else {
                ctx = talloc_get_type(dom->private_data,
                                      struct idmap_ad_context);
        } else {
-               ctx = TALLOC_ZERO_P(dom, struct idmap_ad_context);
+               ctx = talloc_zero(dom, struct idmap_ad_context);
                if (ctx == NULL) {
                        DEBUG(0, ("Out of memory!\n"));
                        return NT_STATUS_NO_MEMORY;
                if (ctx == NULL) {
                        DEBUG(0, ("Out of memory!\n"));
                        return NT_STATUS_NO_MEMORY;
index 9c50f73c4126f67a298beb2ae386bfab6b6dabb8..194544086be5aac9a78b5ee7815f02b7bc482f75 100644 (file)
@@ -110,7 +110,7 @@ static NTSTATUS cell_lookup_forest(struct likewise_cell *c)
                return NT_STATUS_INVALID_PARAMETER;
        }
 
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       if ((gc = TALLOC_ZERO_P(NULL, struct gc_info)) == NULL) {
+       if ((gc = talloc_zero(NULL, struct gc_info)) == NULL) {
                nt_status = NT_STATUS_NO_MEMORY;
                BAIL_ON_NTSTATUS_ERROR(nt_status);
        }
                nt_status = NT_STATUS_NO_MEMORY;
                BAIL_ON_NTSTATUS_ERROR(nt_status);
        }
index 4d2b44ff31e47bf68cb0f5a11d5c879d57e410b2..99dc0cca658affd8e69f2e55148e9c28dd5ebfe5 100644 (file)
@@ -71,7 +71,7 @@ static NTSTATUS dc_add_domain(const char *domain)
                return NT_STATUS_OK;
        }
 
                return NT_STATUS_OK;
        }
 
-       dc = TALLOC_ZERO_P(NULL, struct dc_info);
+       dc = talloc_zero(NULL, struct dc_info);
        BAIL_ON_PTR_ERROR(dc, nt_status);
 
        dc->dns_name = talloc_strdup(dc, domain);
        BAIL_ON_PTR_ERROR(dc, nt_status);
 
        dc->dns_name = talloc_strdup(dc, domain);
index b16aa79997578543e44d3b27af831ce9bf7129c3..461a2e679b7a2aadba202d84a4aa965dbcfe6b3e 100644 (file)
@@ -191,7 +191,7 @@ static NTSTATUS gc_add_forest(const char *domain)
                return NT_STATUS_OK;
        }
 
                return NT_STATUS_OK;
        }
 
-       if ((gc = TALLOC_ZERO_P(NULL, struct gc_info)) == NULL) {
+       if ((gc = talloc_zero(NULL, struct gc_info)) == NULL) {
                nt_status = NT_STATUS_NO_MEMORY;
                BAIL_ON_NTSTATUS_ERROR(nt_status);
        }
                nt_status = NT_STATUS_NO_MEMORY;
                BAIL_ON_NTSTATUS_ERROR(nt_status);
        }
index 0914132b9339a5e801477c706ed722ce8f4eb9be..0e544e90f76374c7585685a0e8c7bb4d9b9aa4f7 100644 (file)
@@ -85,7 +85,7 @@ static struct likewise_cell *_lw_cell_list = NULL;
 
        /* Each cell struct is a TALLOC_CTX* */
 
 
        /* Each cell struct is a TALLOC_CTX* */
 
-       c = TALLOC_ZERO_P(NULL, struct likewise_cell);
+       c = talloc_zero(NULL, struct likewise_cell);
        if (!c) {
                DEBUG(0,("cell_new: memory allocation failure!\n"));
                return NULL;
        if (!c) {
                DEBUG(0,("cell_new: memory allocation failure!\n"));
                return NULL;
index 80d8ed1ec2d10c3c9bdd507d6458cea72a2654ff..0e1750d7c4c4130ca5c99727fed436d0527c64f7 100644 (file)
@@ -377,7 +377,7 @@ static struct autorid_global_config *idmap_autorid_loadconfig(TALLOC_CTX * ctx)
                return NULL;
        }
 
                return NULL;
        }
 
-       cfg = TALLOC_ZERO_P(ctx, struct autorid_global_config);
+       cfg = talloc_zero(ctx, struct autorid_global_config);
        if (!cfg) {
                return NULL;
        }
        if (!cfg) {
                return NULL;
        }
@@ -446,7 +446,7 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
                goto error;
        }
 
                goto error;
        }
 
-       config = TALLOC_ZERO_P(frame, struct autorid_global_config);
+       config = talloc_zero(dom, struct autorid_global_config);
        if (!config) {
                DEBUG(0, ("Out of memory!\n"));
                status = NT_STATUS_NO_MEMORY;
        if (!config) {
                DEBUG(0, ("Out of memory!\n"));
                status = NT_STATUS_NO_MEMORY;
index a9cb4fc3c2c759f867a08d437d91a6dbcde461ce..10d9d2e8b6369bb478b2294c59f58fe6ce338afe 100644 (file)
@@ -443,7 +443,7 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom)
                return NT_STATUS_FILE_IS_OFFLINE;
        }
 
                return NT_STATUS_FILE_IS_OFFLINE;
        }
 
-       ctx = TALLOC_ZERO_P(dom, struct idmap_ldap_context);
+       ctx = talloc_zero(dom, struct idmap_ldap_context);
        if ( ! ctx) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
        if ( ! ctx) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
index 8bb63fd534acddb5878e968925df221881df47b2..edc5e1677405ceb8a2d62341d1a9db99c0b3820e 100644 (file)
@@ -41,7 +41,7 @@ static NTSTATUS idmap_rid_initialize(struct idmap_domain *dom)
        struct idmap_rid_context *ctx;
        char *config_option = NULL;
 
        struct idmap_rid_context *ctx;
        char *config_option = NULL;
 
-       ctx = TALLOC_ZERO_P(dom, struct idmap_rid_context);
+       ctx = talloc_zero(dom, struct idmap_rid_context);
        if (ctx == NULL) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
        if (ctx == NULL) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
index 77ac421d5511d05ebf194b7a335d063231aa4653..a3f95c649351e7e7ce052fc3938d8e296fa3e4da 100644 (file)
@@ -118,7 +118,7 @@ static NTSTATUS nss_domain_list_add_domain(const char *domain,
 {
        struct nss_domain_entry *nss_domain;
 
 {
        struct nss_domain_entry *nss_domain;
 
-       nss_domain = TALLOC_ZERO_P(nss_domain_list, struct nss_domain_entry);
+       nss_domain = talloc_zero(nss_domain_list, struct nss_domain_entry);
        if (!nss_domain) {
                DEBUG(0, ("nss_domain_list_add_domain: talloc() failure!\n"));
                return NT_STATUS_NO_MEMORY;
        if (!nss_domain) {
                DEBUG(0, ("nss_domain_list_add_domain: talloc() failure!\n"));
                return NT_STATUS_NO_MEMORY;
index 4832a62f12c5473974df74efe33872fc89f85530..f3fac6c6305e808794b75160e3ead01cb68e3597 100644 (file)
@@ -133,7 +133,7 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
                return tevent_req_post(req, ev);
        }
 
-       state->res_domains = TALLOC_ZERO_P(state, struct lsa_RefDomainList);
+       state->res_domains = talloc_zero(state, struct lsa_RefDomainList);
        if (tevent_req_nomem(state->res_domains, req)) {
                return tevent_req_post(req, ev);
        }
        if (tevent_req_nomem(state->res_domains, req)) {
                return tevent_req_post(req, ev);
        }
@@ -143,7 +143,7 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
                return tevent_req_post(req, ev);
        }
 
-       state->res_names = TALLOC_ZERO_P(state, struct lsa_TransNameArray);
+       state->res_names = talloc_zero(state, struct lsa_TransNameArray);
        if (tevent_req_nomem(state->res_names, req)) {
                return tevent_req_post(req, ev);
        }
        if (tevent_req_nomem(state->res_names, req)) {
                return tevent_req_post(req, ev);
        }
index 8c6d91e6282fa86d94e0bfddbe7ca95a13b20ce8..3d29e3fd51b6ab941c1a11826923b8b6a9ecfc54 100644 (file)
@@ -785,7 +785,7 @@ static void new_connection(int listen_sock, bool privileged)
 
        /* Create new connection structure */
 
 
        /* Create new connection structure */
 
-       if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) {
+       if ((state = talloc_zero(NULL, struct winbindd_cli_state)) == NULL) {
                close(sock);
                return;
        }
                close(sock);
                return;
        }
index 7480db6a125a6ee64ce015f3a368224699e8e722..5e79a96ca7642a8824364bf8412a9ff8a6d2c209 100644 (file)
@@ -908,7 +908,7 @@ static NTSTATUS winbindd_add_memory_creds_internal(const char *username,
                return winbindd_replace_memory_creds_internal(memcredp, pass);
        }
 
                return winbindd_replace_memory_creds_internal(memcredp, pass);
        }
 
-       memcredp = TALLOC_ZERO_P(NULL, struct WINBINDD_MEMORY_CREDS);
+       memcredp = talloc_zero(NULL, struct WINBINDD_MEMORY_CREDS);
        if (!memcredp) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!memcredp) {
                return NT_STATUS_NO_MEMORY;
        }
index daa8d70d790d14fc87b927e962ad706948490542..9f827375448cd397dac747899262ffa2e0c4dfb4 100644 (file)
@@ -1483,7 +1483,7 @@ static bool fork_domain_child(struct winbindd_child *child)
                        child->domain->startup = False;
                }
 
                        child->domain->startup = False;
                }
 
-               pfds = TALLOC_ZERO_P(talloc_tos(), struct pollfd);
+               pfds = talloc_zero(talloc_tos(), struct pollfd);
                if (pfds == NULL) {
                        DEBUG(1, ("talloc failed\n"));
                        _exit(1);
                if (pfds == NULL) {
                        DEBUG(1, ("talloc failed\n"));
                        _exit(1);
index df8d7b52c25e21fda75035f838cd2dbd08160d4f..bb1aa04bfa09de0e30e7bb453b4659a8afae2596 100644 (file)
@@ -1066,7 +1066,7 @@ static NTSTATUS rpc_try_lookup_sids3(TALLOC_CTX *mem_ctx,
        if (NT_STATUS_IS_ERR(result)) {
                return result;
        }
        if (NT_STATUS_IS_ERR(result)) {
                return result;
        }
-       names = TALLOC_ZERO_P(mem_ctx, struct lsa_TransNameArray);
+       names = talloc_zero(mem_ctx, struct lsa_TransNameArray);
        if (names == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (names == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -1111,7 +1111,7 @@ NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
                return status;
        }
 
                return status;
        }
 
-       names = TALLOC_ZERO_P(mem_ctx, struct lsa_TransNameArray);
+       names = talloc_zero(mem_ctx, struct lsa_TransNameArray);
        if (names == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        if (names == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 63cb2d2f02a908345f8eeb7c7ead5bffc95a0952..7dff138fc137b0a1381da743e024d8ebc5e0dad1 100644 (file)
@@ -261,7 +261,7 @@ static void add_trusted_domains( struct winbindd_domain *domain )
        struct trustdom_state *state;
        struct tevent_req *req;
 
        struct trustdom_state *state;
        struct tevent_req *req;
 
-       state = TALLOC_ZERO_P(NULL, struct trustdom_state);
+       state = talloc_zero(NULL, struct trustdom_state);
        if (state == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return;
        if (state == NULL) {
                DEBUG(0, ("talloc failed\n"));
                return;