]> granicus.if.org Git - graphviz/commitdiff
neatogen compute_new_weights: remove redundant zeroing
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 18 Jan 2023 16:30:16 +0000 (08:30 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 22 Jan 2023 00:32:26 +0000 (16:32 -0800)
The `gv_calloc` allocation does this for us.

lib/neatogen/kkutils.c

index bf0246bab42c41d5e1dbddc9e450f313bd0c4d02..4f93386cf33737e88a3e69bb49d856c080ff4933 100644 (file)
@@ -244,10 +244,6 @@ void compute_new_weights(vtx_data * graph, int n)
     }
     float *weights = gv_calloc(nedges, sizeof(float));
 
-    for (i = 0; i < n; i++) {
-       vtx_vec[i] = 0;
-    }
-
     for (i = 0; i < n; i++) {
        graph[i].ewgts = weights;
        fill_neighbors_vec_unweighted(graph, i, vtx_vec);