From: Volker Lendecke Date: Wed, 31 Dec 2025 13:57:36 +0000 (+0100) Subject: lib: Remove extern const data_blob_null X-Git-Tag: tdb-1.4.15~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71447e1fde280dd6a41fb73abcb24f1d8173b5af;p=thirdparty%2Fsamba.git lib: Remove extern const data_blob_null This actually saves some .text bytes in the code referencing this constant. The compiler should be smarter to do the right thing than to copy from a shared location. Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/lib/util/data_blob.c b/lib/util/data_blob.c index 12f4173c5e6..06375814ecb 100644 --- a/lib/util/data_blob.c +++ b/lib/util/data_blob.c @@ -24,8 +24,6 @@ #include "lib/util/samba_util.h" #include "lib/util/tsort.h" -const DATA_BLOB data_blob_null = { NULL, 0 }; - /** * @file * @brief Manipulation of arbitrary data blobs diff --git a/lib/util/data_blob.h b/lib/util/data_blob.h index 1196eb52eb1..9fed49b5b5d 100644 --- a/lib/util/data_blob.h +++ b/lib/util/data_blob.h @@ -276,7 +276,7 @@ _PUBLIC_ bool data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, _PUBLIC_ bool data_blob_pad(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t pad); -extern const DATA_BLOB data_blob_null; +#define data_blob_null ((DATA_BLOB){}) /** @} */ /* data_blob */