summaryrefslogtreecommitdiff
path: root/libcr
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-04 08:08:10 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-04 08:08:10 -0600
commitf2978da2ca86a9eff1bed2287801e99f131ffd8d (patch)
tree168afdbbe72365be494895ea7dd944e1439bd5fa /libcr
parent5a4f671686dc893350dc6fd40ab769504a334ed9 (diff)
fixup array_len
Diffstat (limited to 'libcr')
-rw-r--r--libcr/coroutine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcr/coroutine.c b/libcr/coroutine.c
index bc67cbb..fac0cd7 100644
--- a/libcr/coroutine.c
+++ b/libcr/coroutine.c
@@ -340,7 +340,7 @@ static cid_t coroutine_running = 0;
/** Return `n` rounded up to the nearest multiple of `d` */
#define round_up(n, d) ( ( ((n)+(d)-1) / (d) ) * (d) )
-#define array_len(arr) (sizeof(arr)/sizeof(arr[0]))
+#define array_len(arr) (sizeof(arr)/sizeof((arr)[0]))
static inline const char* coroutine_state_str(enum coroutine_state state) {
assert(state < array_len(coroutine_state_strs));