diff options
| author | whitespace / reindent <invalid@invalid.invalid> | 2017-08-09 11:49:42 +0200 |
|---|---|---|
| committer | whitespace / reindent <invalid@invalid.invalid> | 2017-08-09 12:03:17 +0200 |
| commit | ac4d0be5874fafd14212d6007fff7495edc9b152 (patch) | |
| tree | 5e2f0d3189de928c849f9983406389ade3b098cb /lib/graph.h | |
| parent | 76a86854181c27819e5cf71b12ae1fa5ccd9e02a (diff) | |
*: reindentreindent-3.0-after
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/graph.h')
| -rw-r--r-- | lib/graph.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/lib/graph.h b/lib/graph.h index 8d8aa3823b..180d16e0f9 100644 --- a/lib/graph.h +++ b/lib/graph.h @@ -27,22 +27,19 @@ #include "vector.h" -struct graph -{ - vector nodes; +struct graph { + vector nodes; }; -struct graph_node -{ - vector from; // nodes which have edges to this node - vector to; // nodes which this node has edges to +struct graph_node { + vector from; // nodes which have edges to this node + vector to; // nodes which this node has edges to - void *data; // node data - void (*del) (void *data); // deletion callback + void *data; // node data + void (*del)(void *data); // deletion callback }; -struct graph * -graph_new (void); +struct graph *graph_new(void); /** * Creates a new node. @@ -52,8 +49,8 @@ graph_new (void); * @param[in] del data deletion callback * @return the new node */ -struct graph_node * -graph_new_node (struct graph *graph, void *data, void (*del) (void*)); +struct graph_node *graph_new_node(struct graph *graph, void *data, + void (*del)(void *)); /** * Deletes a node. @@ -67,8 +64,7 @@ graph_new_node (struct graph *graph, void *data, void (*del) (void*)); * @param[in] graph the graph this node belongs to * @param[out] node pointer to node to delete */ -void -graph_delete_node (struct graph *graph, struct graph_node *node); +void graph_delete_node(struct graph *graph, struct graph_node *node); /** * Makes a directed edge between two nodes. @@ -77,8 +73,8 @@ graph_delete_node (struct graph *graph, struct graph_node *node); * @param[in] to * @return to */ -struct graph_node * -graph_add_edge (struct graph_node *from, struct graph_node *to); +struct graph_node *graph_add_edge(struct graph_node *from, + struct graph_node *to); /** * Removes a directed edge between two nodes. @@ -86,8 +82,7 @@ graph_add_edge (struct graph_node *from, struct graph_node *to); * @param[in] from * @param[in] to */ -void -graph_remove_edge (struct graph_node *from, struct graph_node *to); +void graph_remove_edge(struct graph_node *from, struct graph_node *to); /** * Deletes a graph. @@ -95,7 +90,6 @@ graph_remove_edge (struct graph_node *from, struct graph_node *to); * * @param graph the graph to delete */ -void -graph_delete_graph (struct graph *graph); +void graph_delete_graph(struct graph *graph); #endif /* _ZEBRA_COMMAND_GRAPH_H */ |
