From: Matthew Fernandez Date: Sat, 3 Dec 2022 20:49:26 +0000 (-0800) Subject: neatogen fcmpf: use early return style and add braces X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cec4655dc48615684efdcb52c1941f687f418389;p=graphviz neatogen fcmpf: use early return style and add braces --- diff --git a/lib/neatogen/kkutils.c b/lib/neatogen/kkutils.c index ac4e44bdb..0aa316772 100644 --- a/lib/neatogen/kkutils.c +++ b/lib/neatogen/kkutils.c @@ -180,9 +180,13 @@ fcmpf (int* ip1, int* ip2) { float d1 = fvals[*ip1]; float d2 = fvals[*ip2]; - if (d1 < d2) return -1; - else if (d1 > d2) return 1; - else return 0; + if (d1 < d2) { + return -1; + } + if (d1 > d2) { + return 1; + } + return 0; } void quicksort_placef(float *place, int *ordering, int first, int last)