[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2163-g9fca3ca

Günther Deschner gd at samba.org
Wed Feb 13 09:20:26 GMT 2008


The branch, v3-2-test has been updated
       via  9fca3ca37eaf10c24f852e854dd28b7155c3e536 (commit)
      from  e904a3dd532d7510ac2393e598b3edcf8e1349e8 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 9fca3ca37eaf10c24f852e854dd28b7155c3e536
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 13 10:19:06 2008 +0100

    Merge data_blob_talloc_zero() from samba4.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/lib/data_blob.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/data_blob.c b/source/lib/data_blob.c
index 8bbbc32..daba17d 100644
--- a/source/lib/data_blob.c
+++ b/source/lib/data_blob.c
@@ -144,3 +144,15 @@ DATA_BLOB data_blob_const(const void *p, size_t length)
 	blob.free = NULL;
 	return blob;
 }
+
+/**
+ construct a zero data blob, using supplied TALLOC_CTX.
+ use this sparingly as it initialises data - better to initialise
+ yourself if you want specific data in the blob
+**/
+DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length)
+{
+	DATA_BLOB blob = data_blob_talloc(mem_ctx, NULL, length);
+	data_blob_clear(&blob);
+	return blob;
+}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list