lib/tdr: get rid of build warning when using TDR_ALLOC macro.
[ira/wip.git] / 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)