From: Matthew Fernandez Date: Sun, 11 Oct 2020 17:06:29 +0000 (-0700) Subject: push some variables' scopes inwards and change an int to a boolean X-Git-Tag: 2.46.0~20^2^2~12^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfb0c3adcf3308a30ffd8db46e988a09f2eec027;p=graphviz push some variables' scopes inwards and change an int to a boolean This has no effect on functionality but makes the code a little clearer and less error prone. --- diff --git a/lib/ortho/trapezoid.c b/lib/ortho/trapezoid.c index 985cd9350..1b555ec53 100644 --- a/lib/ortho/trapezoid.c +++ b/lib/ortho/trapezoid.c @@ -24,6 +24,7 @@ #include #include #include +#include #include /* Node types */ @@ -353,13 +354,14 @@ static void merge_trapezoids (int segnum, int tfirst, int tlast, int side, trap_t* tr, qnode_t* qs) { - int t, tnext, cond; - int ptnext; + int t; /* First merge polys on the LHS */ t = tfirst; while (t > 0 && _greater_than_equal_to(&tr[t].lo, &tr[tlast].lo)) { + int tnext, ptnext; + boolean cond; if (side == S_LEFT) cond = ((tnext = tr[t].d0) > 0 && tr[tnext].rseg == segnum) || ((tnext = tr[t].d1) > 0 && tr[tnext].rseg == segnum);