diff options
-rw-r--r-- | src/ipcpd/normal/graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/normal/graph.c b/src/ipcpd/normal/graph.c index dd6b0e7a..5fd6fcb6 100644 --- a/src/ipcpd/normal/graph.c +++ b/src/ipcpd/normal/graph.c @@ -475,7 +475,7 @@ ssize_t graph_routing_table(struct graph * graph, index = get_vertex_index(graph, prev); } - (*table)[++j] = malloc(sizeof(***table)); + (*table)[j] = malloc(sizeof(***table)); if ((*table)[j] == NULL) { pthread_mutex_unlock(&graph->lock); for (k = 0; k < j; ++k) @@ -487,7 +487,7 @@ ssize_t graph_routing_table(struct graph * graph, (*table)[j]->dst = v->addr; (*table)[j]->nhop = nhop->addr; - + j++; i++; } |