core: Fix cu__for_each_variable to cover an empty tags table
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
d7d419f6ab
commit
0bc59195d4
|
@ -217,10 +217,8 @@ static inline void cu__cache_symtab(struct cu *self)
|
||||||
* @id: uint32_t tag id
|
* @id: uint32_t tag id
|
||||||
*/
|
*/
|
||||||
#define cu__for_each_variable(cu, id, pos) \
|
#define cu__for_each_variable(cu, id, pos) \
|
||||||
for (id = 0, pos = cu->tags_table.entries[id]; \
|
for (id = 0; id < cu->tags_table.nr_entries; ++id) \
|
||||||
id < cu->tags_table.nr_entries; \
|
if (!(pos = cu->tags_table.entries[id]) || \
|
||||||
pos = cu->tags_table.entries[++id]) \
|
|
||||||
if (pos == NULL || \
|
|
||||||
!tag__is_variable(pos)) \
|
!tag__is_variable(pos)) \
|
||||||
continue; \
|
continue; \
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue