about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-12-09 18:56:14 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-12-09 18:56:14 +0100
commit0d4ed9d40efa84e8dc88e64cf337c8e95af7b045 (patch)
tree882de6b3fd26c9b41f062baa1b15df6c858f3eb2
parentf88242af19dc970949806790f70c6fd6336944a6 (diff)
downloadglibc-0d4ed9d40efa84e8dc88e64cf337c8e95af7b045.tar.gz
glibc-0d4ed9d40efa84e8dc88e64cf337c8e95af7b045.tar.xz
glibc-0d4ed9d40efa84e8dc88e64cf337c8e95af7b045.zip
elf: Fix incorrect comparison in sort_priorities_by_name
Reported-By: Stefan Liebler <stli@linux.ibm.com>
-rw-r--r--elf/dl-hwcaps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c
index 5a71f80154..000e3c0eb9 100644
--- a/elf/dl-hwcaps.c
+++ b/elf/dl-hwcaps.c
@@ -153,7 +153,7 @@ sort_priorities_by_name (void)
 	else
 	  to_compare = previous->name_length;
 	int cmp = memcmp (current->name, previous->name, to_compare);
-	if (cmp >= 0
+	if (cmp > 0
 	    || (cmp == 0 && current->name_length >= previous->name_length))
 	  break;