From cee8aab5a29008dc16bf9861145690de1159157f Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 8 Jan 2024 08:47:21 +1030 Subject: [PATCH] Static initialiser for array, fix some documentation. --- ez-array.h | 2 ++ ez-set.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ez-array.h b/ez-array.h index 76efe4a..81487aa 100644 --- a/ez-array.h +++ b/ez-array.h @@ -22,6 +22,8 @@ typedef struct ez_array ez_array; +#define EZ_INIT_ARRAY(a) { 0 } + // layout compatible with ez_blob struct ez_array { size_t ea_size; // valid size in bytes diff --git a/ez-set.h b/ez-set.h index 19ef7e2..b9be90f 100644 --- a/ez-set.h +++ b/ez-set.h @@ -183,7 +183,7 @@ static __inline__ void *ez_set_scan_get(ez_set_scan *scan) { ez_set_scan scan; struct entry_type *entry; - for (entry = ez_scan_init(set, &scan); entry; entry = ez_scan_next(&scan)) { + for (entry = ez_set_scan_init(set, &scan); entry; entry = ez_set_scan_next(&scan)) { ... work on entry ... } -- 2.39.5