From: Matthew Fernandez Date: Mon, 20 Dec 2021 03:41:40 +0000 (-0800) Subject: poly_init: rephrase some open coded 'fmax' X-Git-Tag: 3.0.0~112^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=367b10b52ebf59cde24578507ffda4e049d3d417;p=graphviz poly_init: rephrase some open coded 'fmax' --- diff --git a/lib/common/shapes.c b/lib/common/shapes.c index fa56b1659..ff603e276 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -1902,10 +1902,8 @@ static void poly_init(node_t * n) if ((p = agget(n, "margin"))) { marginx = marginy = 0; i = sscanf(p, "%lf,%lf", &marginx, &marginy); - if (marginx < 0) - marginx = 0; - if (marginy < 0) - marginy = 0; + marginx = fmax(marginx, 0); + marginy = fmax(marginy, 0); if (i > 0) { dimen.x += 2 * POINTS(marginx); if (i > 1)