]> git.ozlabs.org Git - ccan/blobdiff - ccan/agar/test/error-graph.c
agar: Add static graph initializer
[ccan] / ccan / agar / test / error-graph.c
index efd83a37bf0fba6ba27c5007cf9991b8ef379701..cfef8abe5327cd9ce618a3ca6cb1b9dc219e5f97 100644 (file)
@@ -48,8 +48,7 @@ static int error_edge_info_r(const struct agar_graph *gr,
        return 0;
 }
 
-void error_graphr_init(struct error_graphr *egr)
-{
-       agar_init_graph(&egr->gr, error_first_edge_r, error_next_edge_r,
-                       error_edge_info_r);
-}
+struct error_graphr error_graphr = {
+       AGAR_INIT_GRAPH(error_first_edge_r, error_next_edge_r,
+                       error_edge_info_r),
+};