]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Remove extern const data_blob_null
authorVolker Lendecke <vl@samba.org>
Wed, 31 Dec 2025 13:57:36 +0000 (14:57 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Jan 2026 11:53:34 +0000 (11:53 +0000)
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 <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
lib/util/data_blob.c
lib/util/data_blob.h

index 12f4173c5e66996ae4e2af7a9b7764fb6eb2428c..06375814ecbac52974d91cb072bc0830d8f646ba 100644 (file)
@@ -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
index 1196eb52eb1181731b2b006a4b19337bf9765249..9fed49b5b5d03397be5f8801bcc38fde7f33bb47 100644 (file)
@@ -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 */