about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-01-07 02:06:20 +0100
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-02-04 16:44:29 -0300
commit1e3d9c1e4dc3ad4d6eba2ecec86c97b0ccac2794 (patch)
tree353fd00012a6f5e247c3ca63a55fa59129e528f5 /elf
parentbbf15241dbaf56e2590203771b1e39d35b6d3701 (diff)
downloadglibc-1e3d9c1e4dc3ad4d6eba2ecec86c97b0ccac2794.tar.gz
glibc-1e3d9c1e4dc3ad4d6eba2ecec86c97b0ccac2794.tar.xz
glibc-1e3d9c1e4dc3ad4d6eba2ecec86c97b0ccac2794.zip
argp: Avoid undefined behaviour when invoking qsort().
This fixes a Gnulib test-argp-2.sh test failure on macOS and FreeBSD.

Reported by Jeffrey Walton <noloader@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00085.html>.

* argp/argp-help.c (group_cmp): Remove third argument.
(hol_sibling_cluster_cmp, hol_cousin_cluster_cmp): New functions, based
upon hol_cluster_cmp.
(hol_cluster_cmp): Use hol_cousin_cluster_cmp.
(hol_entry_cmp): Rewritten to implement a total order.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf')
0 files changed, 0 insertions, 0 deletions