traversal testcase: remove redundant context initialization
authorNathan Lynch <ntl@pobox.com>
Tue, 21 Oct 2008 11:39:27 +0000 (06:39 -0500)
committerNathan Lynch <ntl@pobox.com>
Tue, 21 Oct 2008 11:39:27 +0000 (06:39 -0500)
The boilerplate code is already initializing a context, no need to
duplicate this.

tests/traversal.c

index 60859e83b8b14796aee324d9e663c6409e86ce85..c364f1025a9b9c79c229cbd3ffb96f70e58e66c5 100644 (file)
 #include "boilerplate-begin.h"
 
 {
-       topo_context_t ctx;
-       topo_procent_t sys;
        topo_procent_t node;
        size_t nodes = 0;
-       int rc;
-
-       rc = topology_init_context(&ctx, &sys);
-       fail_on(rc != 0);
 
        node = (topo_procent_t)0;
        while ((node = topology_traverse(sys, node, TOPOLOGY_NODE))) {
@@ -79,7 +73,5 @@
                nodes++;
        }
        fail_on(nodes != 2);
-
-       topology_free_context(ctx);
 }
 #include "boilerplate-end.h"