summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eina_graph_suite.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tests/eina_graph_suite.c b/src/tests/eina_graph_suite.c
index c866b36..695e7ab 100644
--- a/src/tests/eina_graph_suite.c
+++ b/src/tests/eina_graph_suite.c
@@ -28,7 +28,7 @@ static void _bfs_tests(unsigned int vertices[], unsigned int n)
{
Eina_Graph *g;
Eina_Graph_BFS *bfs;
- Eina_List *path, *l;
+ Eina_List *path;
void *data;
int i;
@@ -50,11 +50,12 @@ static void _bfs_tests(unsigned int vertices[], unsigned int n)
ck_assert(path != NULL);
ck_assert(eina_list_count(path) == n);
i = 0;
- EINA_LIST_FOREACH(path, l, data)
+ EINA_LIST_FREE(path, data)
{
ck_assert(vertices[i] == CAST_D(data));
i++;
}
+ path = NULL;
eina_graph_bfs_free(bfs);
eina_graph_free(g);
@@ -73,7 +74,7 @@ static void _dfs_tests(Eina_Bool r, unsigned int vertices[], unsigned int n)
{
Eina_Graph *g;
Eina_Graph_DFS *dfs;
- Eina_List *path, *l;
+ Eina_List *path;
void *data;
int i;
@@ -93,11 +94,12 @@ static void _dfs_tests(Eina_Bool r, unsigned int vertices[], unsigned int n)
ck_assert(path != NULL);
ck_assert(eina_list_count(path) == n);
i = 0;
- EINA_LIST_FOREACH(path, l, data)
+ EINA_LIST_FREE(path, data)
{
ck_assert(vertices[i] == CAST_D(data));
i++;
}
+ path = NULL;
eina_graph_dfs_free(dfs);
eina_graph_free(g);