From 5f9dc953d8a5b422bd98c2e91353a17a84d399ef Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Thu, 29 Nov 2012 11:24:16 +0100 Subject: [PATCH] be more paranoid with ALLOC2D --- c_utils/c_utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c_utils/c_utils.h b/c_utils/c_utils.h index 768d2b7..0503449 100644 --- a/c_utils/c_utils.h +++ b/c_utils/c_utils.h @@ -113,10 +113,10 @@ void util_free_ (void *ptr); #define ALLOC2D(ptr,type,num1,num2) \ do { \ size_t cnt_, num1_=(num1), num2_=(num2); \ - ALLOC(ptr,type *,num1_); \ - ALLOC(ptr[0],type,num1_*num2_); \ + ALLOC((ptr),type *,num1_); \ + ALLOC((ptr)[0],type,num1_*num2_); \ for (cnt_=1; cnt_