]> granicus.if.org Git - graphviz/commitdiff
Fix: c-1241 cc: ERROR File = compute_hierarchy.c, Line = 120
authorellson <devnull@localhost>
Tue, 19 Jul 2005 13:41:54 +0000 (13:41 +0000)
committerellson <devnull@localhost>
Tue, 19 Jul 2005 13:41:54 +0000 (13:41 +0000)
  A declaration cannot appear after an executable statement in a block.

lib/neatogen/compute_hierarchy.c

index 683b3b286e694a94f1c2c2c15035ee448b4678ff..56ac70adde1107551e73504e3831f82871562d34 100644 (file)
@@ -116,8 +116,8 @@ compute_hierarchy(vtx_data* graph, int n, double abs_tol, double relative_tol,
                levels[0] = n;
        }
        else {
-               *levelsp = levels = N_GNEW(num_levels, int);
                int count=0;
+               *levelsp = levels = N_GNEW(num_levels, int);
                for (i=1; i<n; i++) {
                        if (y[ordering[i]] - y[ordering[i-1]] > tol) {
                                levels[count++] = i;