From: Volker Lendecke Date: Fri, 17 Oct 2025 12:44:56 +0000 (+0200) Subject: s3: Remove TALLOC_REALLOC() macro X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffb895b51be8e5155ecf145ab1652c088fa7b0fc;p=thirdparty%2Fsamba.git s3: Remove TALLOC_REALLOC() macro Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 5a7da2f90de..be81d21a296 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -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 diff --git a/source3/lib/util.c b/source3/lib/util.c index 9798cacca86..95e6872ed41 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -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; diff --git a/source3/printing/notify.c b/source3/printing/notify.c index 80c2a94d1e6..029e2a70e29 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -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;