X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Flist%2Ftest%2Frun-with-debug.c;h=f76bccc12773ee2e6a55e6ae0c13ee790361f0db;hp=d34c660e6582b96b3eedd9443684c22dd012ef0b;hb=dc0aafc9d58e231f5d6d70c9838b151a162428b1;hpb=a04a5f7472bd8146936864702084e533d474eea4 diff --git a/ccan/list/test/run-with-debug.c b/ccan/list/test/run-with-debug.c index d34c660e..f76bccc1 100644 --- a/ccan/list/test/run-with-debug.c +++ b/ccan/list/test/run-with-debug.c @@ -102,21 +102,23 @@ int main(int argc, char *argv[]) } ok1(i == 3); - /* Test list_for_each_safe and list_del. */ + /* Test list_for_each_safe, list_del and list_del_from. */ i = 0; list_for_each_safe(&parent.children, c, n, list) { switch (i++) { case 0: - ok1(c == &c1); + ok1(c == &c1); + list_del(&c->list); break; case 1: ok1(c == &c2); + list_del_from(&parent.children, &c->list); break; case 2: ok1(c == &c3); + list_del_from(&parent.children, &c->list); break; } - list_del(&c->list); ok1(list_check(&parent.children, NULL)); if (i > 2) break;