[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-561-g89cb104

Volker Lendecke vlendec at samba.org
Sun Mar 22 21:11:28 GMT 2009


The branch, v3-4-test has been updated
       via  89cb10430c30c9e59a5305210b7f09346b360c42 (commit)
      from  4a4c69d26526294aa6e9b98d34d8495fc3fc65e8 (commit)

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


- Log -----------------------------------------------------------------
commit 89cb10430c30c9e59a5305210b7f09346b360c42
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 22 22:07:58 2009 +0100

    talloc_array_length: talloc_get_size deals fine with NULL

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

Summary of changes:
 lib/talloc/talloc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index 5c8d5c5..f87564a 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -94,7 +94,7 @@ typedef void TALLOC_CTX;
 #define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__)
 #define talloc_array_ptrtype(ctx, ptr, count) (_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
-#define talloc_array_length(ctx) ((ctx) ? talloc_get_size(ctx)/sizeof(*ctx) : 0)
+#define talloc_array_length(ctx) (talloc_get_size(ctx)/sizeof(*ctx))
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type)
 #define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, __location__)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list