https://bugs.gentoo.org/show_bug.cgi?id=143753 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197451 diff -urN prelink-0.0.20060712.orig/src/cache.c prelink-0.0.20060712/src/cache.c --- prelink-0.0.20060712.orig/src/cache.c 2006-08-15 23:36:13.000000000 +0000 +++ prelink-0.0.20060712/src/cache.c 2006-08-15 23:36:34.000000000 +0000 @@ -336,8 +336,8 @@ struct prelink_entry *a = * (struct prelink_entry **) A; struct prelink_entry *b = * (struct prelink_entry **) B; - if (a == NULL && b != NULL) - return 1; + if (a == NULL) + return (b != NULL); if (a != NULL && b == NULL) return -1;