aboutsummaryrefslogtreecommitdiff
path: root/liberty.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-23 23:14:04 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-23 23:14:04 +0100
commit084e964286bfcd13ee6a25a2ee35dfba9da1072e (patch)
treee1680ea3aaa78320f7b589f37a96eb3bbc929a6a /liberty.c
parent0e08055d6d361d2a902225046e1e463bc8ce50c0 (diff)
downloadliberty-084e964286bfcd13ee6a25a2ee35dfba9da1072e.tar.gz
liberty-084e964286bfcd13ee6a25a2ee35dfba9da1072e.tar.xz
liberty-084e964286bfcd13ee6a25a2ee35dfba9da1072e.zip
Fixes to the previous batch of commits
Diffstat (limited to 'liberty.c')
-rw-r--r--liberty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/liberty.c b/liberty.c
index 86852fd..5ed68da 100644
--- a/liberty.c
+++ b/liberty.c
@@ -305,17 +305,17 @@ xstrndup (const char *s, size_t n)
// The most basic helper macros to make working with arrays not suck
-#define ARRAY(type, name) type *name; size_t name ## _len, name ## _size;
+#define ARRAY(type, name) type *name; size_t name ## _len, name ## _alloc;
#define ARRAY_INIT_SIZED(a, n) \
BLOCK_START \
- (a) = xcalloc (sizeof *(a), (a ## _size) = (n)); \
+ (a) = xcalloc (sizeof *(a), (a ## _alloc) = (n)); \
(a ## _len) = 0; \
BLOCK_END
#define ARRAY_INIT(a) ARRAY_INIT_SIZED (a, 16)
#define ARRAY_RESERVE(a, n) \
BLOCK_START \
- while ((a ## _size) - (a ## _len) < n) \
- (a) = xreallocarray ((a), sizeof *(a), (a ## _size) <<= 1); \
+ while ((a ## _alloc) - (a ## _len) < n) \
+ (a) = xreallocarray ((a), sizeof *(a), (a ## _alloc) <<= 1); \
BLOCK_END
// --- Double-linked list helpers ----------------------------------------------