From 147d8fc1a7b9e16c3537588b700a9f3f97c40b08 Mon Sep 17 00:00:00 2001 From: Benjamin Robin Date: Sun, 10 May 2020 18:33:16 +0200 Subject: [PATCH] basic: Allow to call STRV_FOREACH_BACKWARDS() with a char * const * strv --- src/basic/strv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/strv.h b/src/basic/strv.h index 0837e65a183..0f81e345800 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -106,7 +106,7 @@ bool strv_overlap(char * const *a, char * const *b) _pure_; #define STRV_FOREACH_BACKWARDS(s, l) \ for (s = ({ \ - char **_l = l; \ + typeof(l) _l = l; \ _l ? _l + strv_length(_l) - 1U : NULL; \ }); \ (l) && ((s) >= (l)); \ -- 2.47.3