From 7c3c0b1013b40f9579256f03a058862253d5013d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 29 Oct 2020 10:29:30 +1030 Subject: [PATCH] common: allow tal_arr_expand() to have an `n` argument. It needs to use a non-clashing name for the internal var. Signed-off-by: Rusty Russell --- common/utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/utils.h b/common/utils.h index e1471c34d..fa63c6c88 100644 --- a/common/utils.h +++ b/common/utils.h @@ -47,9 +47,9 @@ void clear_softref_(const tal_t *outer, size_t outersize, void **ptr); /* Note: p is never a complex expression, otherwise this multi-evaluates! */ #define tal_arr_expand(p, s) \ do { \ - size_t n = tal_count(*(p)); \ - tal_resize((p), n+1); \ - (*(p))[n] = (s); \ + size_t n_ = tal_count(*(p)); \ + tal_resize((p), n_+1); \ + (*(p))[n_] = (s); \ } while(0) /**