]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Replace TALLOC_SIZE() with talloc_size()
authorVolker Lendecke <vl@samba.org>
Fri, 17 Oct 2025 12:28:40 +0000 (14:28 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 10 Nov 2025 13:29:30 +0000 (13:29 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/include/smb_macros.h
source3/modules/vfs_aixacl2.c
source3/modules/vfs_gpfs.c

index da2e5d591c60d6245a9f5395f2114a55719eeee1..b29e8e4201a3638bb5ef1eb16a04ee5c8eadac2e 100644 (file)
@@ -211,7 +211,6 @@ copy an IP address from one buffer to another
 #define SMB_XMALLOC_P(type) (type *)smb_xmalloc_array(sizeof(type),1)
 #define SMB_XMALLOC_ARRAY(type,count) (type *)smb_xmalloc_array(sizeof(type),(count))
 
-#define TALLOC_SIZE(ctx, size) talloc_named_const(ctx, size, __location__)
 #define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, __location__)
 #define talloc_destroy(ctx) talloc_free(ctx)
 #ifndef TALLOC_FREE
index 35c731288711b9b8e7294aa817634a85a8280b56..7343e284bb5cc5af455093c0274ff758075ab8e9 100644 (file)
@@ -62,7 +62,7 @@ static AIXJFS2_ACL_T *aixjfs2_getacl_alloc(const char *fname, acl_type_t *type)
        TALLOC_CTX      *mem_ctx;
 
        mem_ctx = talloc_tos();
-       acl = (AIXJFS2_ACL_T *)TALLOC_SIZE(mem_ctx, len);
+       acl = (AIXJFS2_ACL_T *)talloc_size(mem_ctx, len);
        if (acl == NULL) {
                errno = ENOMEM;
                return NULL;
@@ -77,7 +77,7 @@ static AIXJFS2_ACL_T *aixjfs2_getacl_alloc(const char *fname, acl_type_t *type)
                len = aixacl2_getlen(acl, type) + sizeof(AIXJFS2_ACL_T);
                DEBUG(10,("aixjfs2_getacl_alloc - acl_len:%d\n",len));
 
-               acl = (AIXJFS2_ACL_T *)TALLOC_SIZE(mem_ctx, len);
+               acl = (AIXJFS2_ACL_T *)talloc_size(mem_ctx, len);
                if (acl == NULL) {
                        errno = ENOMEM;
                        return NULL;
@@ -316,7 +316,7 @@ static bool aixjfs2_process_smbacl(vfs_handle_struct *handle,
 
        naces = smb_get_naces(smbacl);
        aclLen = ACL_V4_SIZ + naces * entryLen;
-       jfs2acl = (nfs4_acl_int_t *)TALLOC_SIZE(mem_ctx, aclLen);
+       jfs2acl = (nfs4_acl_int_t *)talloc_size(mem_ctx, aclLen);
        if (jfs2acl==NULL) {
                DEBUG(0, ("TALLOC_SIZE failed\n"));
                errno = ENOMEM;
index 130aa5110a8248acd54a2a98d1f7a4949d5cd6d6..9c88641577ea16f5bcc98529b7261aa9595cfc78 100644 (file)
@@ -748,7 +748,7 @@ static struct gpfs_acl *vfs_gpfs_smbacl2gpfsacl(TALLOC_CTX *mem_ctx,
        gacl_len = offsetof(gpfs_acl_t, ace_v4) + sizeof(unsigned int)
                + smb_get_naces(smbacl) * sizeof(gpfs_ace_v4_t);
 
-       gacl = (struct gpfs_acl *)TALLOC_SIZE(mem_ctx, gacl_len);
+       gacl = (struct gpfs_acl *)talloc_size(mem_ctx, gacl_len);
        if (gacl == NULL) {
                DEBUG(0, ("talloc failed\n"));
                errno = ENOMEM;