summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2012-08-28 12:43:55 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2012-08-28 20:07:22 -0700
commitc75c947b6e9bc725821b28835f3667c4aabef9ee (patch)
tree8d866ea3bf35986298d315a34ac923bde41fdfa3 /test
parent486038fe16957b39d39842365c5409c494c9a8df (diff)
test/list: Fix test_xorg_list_del test
We never use child[2], so it's state is undefined. This issue seems to have existed since the test was first written: 92788e677be79bd04e5ef140f4ced50ad8b1bf8e Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r--test/list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/list.c b/test/list.c
index 82d232706..f9f54ee4e 100644
--- a/test/list.c
+++ b/test/list.c
@@ -137,7 +137,7 @@ static void
test_xorg_list_del(void)
{
struct parent parent = { 0 };
- struct child child[3];
+ struct child child[2];
struct child *c;
xorg_list_init(&parent.children);
@@ -178,8 +178,8 @@ test_xorg_list_del(void)
xorg_list_add(&child[0].node, &parent.children);
xorg_list_del(&parent.children);
assert(xorg_list_is_empty(&parent.children));
+ assert(!xorg_list_is_empty(&child[0].node));
assert(!xorg_list_is_empty(&child[1].node));
- assert(!xorg_list_is_empty(&child[2].node));
}
static void