Use of M_ASSERT_INDEX for list.
This commit is contained in:
1 parent
201cc45fd8
commit
067a034bc9
1 file changed
+1
-1
@@ -461,7 +461,7 @@
|
|||||||
struct M_C(name, _s) *it = *list; \
|
struct M_C(name, _s) *it = *list; \
|
||||||
/* FIXME: How to avoid the double iteration over the list? */ \
|
/* FIXME: How to avoid the double iteration over the list? */ \
|
||||||
size_t len = M_C(name,_size)(list); \
|
size_t len = M_C(name,_size)(list); \
|
||||||
assert (i < len); \
|
M_ASSERT_INDEX (i, len); \
|
||||||
size_t j = len-1; \
|
size_t j = len-1; \
|
||||||
while (true) { \
|
while (true) { \
|
||||||
assert (it != NULL); \
|
assert (it != NULL); \
|
||||||
|
|||||||
Reference in new issue
Block a user