]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Remove TALLOC_REALLOC() macro
authorVolker Lendecke <vl@samba.org>
Fri, 17 Oct 2025 12:44:56 +0000 (14:44 +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/lib/util.c
source3/printing/notify.c

index 5a7da2f90de5c2e0f0ca2cfd6e74673e528ae5e6..be81d21a296ef87bd34f63365b2440eecfa7f751 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_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, __location__)
 #ifndef TALLOC_FREE
 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
 #endif
index 9798cacca86219d5fe74a21791366a9c9f4f3168..95e6872ed419f2308225d58a37ef026e612bd2d1 100644 (file)
@@ -549,8 +549,9 @@ void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
                        goto error;
                }
 
-               *array = TALLOC_REALLOC(mem_ctx, *array,
-                                       element_size * (*array_size));
+               *array = talloc_realloc_size(mem_ctx,
+                                            *array,
+                                            element_size * (*array_size));
 
                if (*array == NULL) {
                        goto error;
index 80c2a94d1e6f8685c173fc59a17f8b12cc88cc0f..029e2a70e29263dd2ae99074df00b6dbb2cb35f2 100644 (file)
@@ -112,7 +112,7 @@ again:
                                msg->len, msg->notify.data);
 
        if (buflen != len) {
-               buf = (uint8_t *)TALLOC_REALLOC(send_ctx, buf, len);
+               buf = talloc_realloc(send_ctx, buf, uint8_t, len);
                if (!buf)
                        return False;
                buflen = len;