Mercurial > hg > octave-nkf > gnulib-hg
changeset 8756:8a62dff89d5a
(hol_cluster_cmp): Reverse comparison. Change proposed by Sven Verdoolaege.
author | Sergey Poznyakoff <gray@gnu.org.ua> |
---|---|
date | Sun, 29 Apr 2007 12:02:27 +0000 |
parents | 4ae117cb36cd |
children | 9f37008981ab |
files | lib/argp-help.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/argp-help.c +++ b/lib/argp-help.c @@ -673,10 +673,12 @@ 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