]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - argp/argp-help.c
[BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #3483,...
[thirdparty/glibc.git] / argp / argp-help.c
index c12b10e235fcb9901b53fd14b85cf86281ba204a..13c0820710d6173d835b290d1650ecfdbda9979a 100644 (file)
@@ -1,6 +1,5 @@
 /* Hierarchial argument parsing help output
-   Copyright (C) 1995-2003, 2004, 2005, 2006, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -673,9 +672,9 @@ 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)
+  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
@@ -988,7 +987,7 @@ static const char *
 filter_doc (const char *doc, int key, const struct argp *argp,
            const struct argp_state *state)
 {
-  if (argp && argp->help_filter)
+  if (argp->help_filter)
     /* We must apply a user filter to this output.  */
     {
       void *input = __argp_input (argp, state);