diff options
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r-- | src/include/gnunet_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index b4bf5b0aa..1b982cc15 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -1074,7 +1074,7 @@ GNUNET_ntoh_double (double d); | |||
1074 | * @param tsize the target size for the resulting vector, use 0 to | 1074 | * @param tsize the target size for the resulting vector, use 0 to |
1075 | * free the vector (then, arr will be NULL afterwards). | 1075 | * free the vector (then, arr will be NULL afterwards). |
1076 | */ | 1076 | */ |
1077 | #define GNUNET_array_grow(arr,size,tsize) GNUNET_xgrow_((void**)&arr, sizeof(arr[0]), &size, tsize, __FILE__, __LINE__) | 1077 | #define GNUNET_array_grow(arr,size,tsize) GNUNET_xgrow_((void**)&(arr), sizeof((arr)[0]), &size, tsize, __FILE__, __LINE__) |
1078 | 1078 | ||
1079 | /** | 1079 | /** |
1080 | * @ingroup memory | 1080 | * @ingroup memory |
@@ -1089,7 +1089,7 @@ GNUNET_ntoh_double (double d); | |||
1089 | * array size | 1089 | * array size |
1090 | * @param element the element that will be appended to the array | 1090 | * @param element the element that will be appended to the array |
1091 | */ | 1091 | */ |
1092 | #define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0) | 1092 | #define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); (arr)[size-1] = element; } while(0) |
1093 | 1093 | ||
1094 | /** | 1094 | /** |
1095 | * @ingroup memory | 1095 | * @ingroup memory |