From: Matthew Fernandez Date: Sun, 20 Nov 2022 20:18:10 +0000 (-0800) Subject: circogen cmpDegree: abbreviate into early return style X-Git-Tag: 7.0.3~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09c832ee013c2263db569e4c7041a544602d80f1;p=graphviz circogen cmpDegree: abbreviate into early return style --- diff --git a/lib/circogen/deglist.c b/lib/circogen/deglist.c index 3acaf7725..0a663628d 100644 --- a/lib/circogen/deglist.c +++ b/lib/circogen/deglist.c @@ -45,12 +45,13 @@ static int cmpDegree(Dt_t * d, int *key1, int *key2, Dtdisc_t * disc) (void)d; (void)disc; - if (*key1 < *key2) + if (*key1 < *key2) { return -1; - else if (*key1 > *key2) + } + if (*key1 > *key2) { return 1; - else - return 0; + } + return 0; } static Dtdisc_t nodeDisc = {