lib/tdr: get rid of build warning when using TDR_ALLOC macro.
authorGünther Deschner <gd@samba.org>
Thu, 1 Oct 2009 23:25:13 +0000 (01:25 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 5 Oct 2009 09:15:45 +0000 (11:15 +0200)
Guenther

lib/tdr/tdr.h

index 1eedc580d54fda841406f6f6ada90534d59440fb..84f3e50c2ba89691aa38ff6f1ef46736facd0643 100644 (file)
@@ -55,7 +55,7 @@ struct tdr_print {
                         } while (0)
 
 #define TDR_ALLOC(ctx, s, n) do { \
-                              (s) = talloc_array_size(ctx, sizeof(*(s)), n); \
+                              (s) = talloc_array_ptrtype(ctx, (s), n); \
                            if ((n) && !(s)) return NT_STATUS_NO_MEMORY; \
                            } while (0)