From a7ddf2cb0cee93a83b580a33b9c9dcad5db21449 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 29 Apr 2007 12:02:27 +0000 Subject: [PATCH] (hol_cluster_cmp): Reverse comparison. Change proposed by Sven Verdoolaege. --- lib/argp-help.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/argp-help.c b/lib/argp-help.c index 7321480820..fd7f016c82 100644 --- a/lib/argp-help.c +++ b/lib/argp-help.c @@ -673,10 +673,12 @@ static int hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2) { /* If one cluster is deeper than the other, use its ancestor at the same - level, so that finding the common ancestor is straightforward. */ - while (cl1->depth < cl2->depth) + level, so that finding the common ancestor is straightforward. + + clN->depth > 0 means that clN->parent != NULL (see hol_add_cluster) */ + while (cl1->depth > cl2->depth) cl1 = cl1->parent; - while (cl2->depth < cl1->depth) + while (cl2->depth > cl1->depth) cl2 = cl2->parent; /* Now reduce both clusters to their ancestors at the point where both have -- 2.30.2