From: Matthew Fernandez Date: Wed, 24 Mar 2021 03:57:45 +0000 (-0700) Subject: RectArea: move definitions closer to their use X-Git-Tag: 2.47.1~21^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b125d40c3d6ebd3979d18b6d8b1775ceb17febf0;p=graphviz RectArea: move definitions closer to their use --- diff --git a/lib/label/rectangle.c b/lib/label/rectangle.c index 881165253..633c888c1 100644 --- a/lib/label/rectangle.c +++ b/lib/label/rectangle.c @@ -64,15 +64,13 @@ void PrintRect(Rect_t * r) unsigned int RectArea(Rect_t * r) { - int i; - unsigned int area; assert(r); if (Undefined(r)) return 0; - area = 1; - for (i = 0; i < NUMDIMS; i++) { + unsigned area = 1; + for (size_t i = 0; i < NUMDIMS; i++) { unsigned int dim = r->boundary[i + NUMDIMS] - r->boundary[i]; if (dim == 0) return 0; if (UINT_MAX / dim < area) {