Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/contrib/elftoolchain/nm/nm.c b/contrib/elftoolchain/nm/nm.c
- index 637cdd9..c5657b5 100644
- --- a/contrib/elftoolchain/nm/nm.c
- +++ b/contrib/elftoolchain/nm/nm.c
- @@ -375,21 +375,21 @@ cmp_value(const void *lp, const void *rp)
- assert(l_is_undef + r_is_undef <= 2);
- switch (l_is_undef + r_is_undef) {
- - case 0:
- - /* Both defined */
- - if (l->sym->st_value == r->sym->st_value)
- - return (strcmp(l->name, r->name));
- - return (l->sym->st_value - r->sym->st_value);
- case 1:
- /* One undefined */
- return (l_is_undef == 0 ? 1 : -1);
- case 2:
- /* Both undefined */
- return (strcmp(l->name, r->name));
- + default:
- + break;
- }
- - /* NOTREACHED */
- - return (l->sym->st_value - r->sym->st_value);
- + assert(l_is_undef + r_is_undef == 0);
- + /* Both defined */
- + if (l->sym->st_value == r->sym->st_value)
- + return (strcmp(l->name, r->name));
- + return ((l->sym->st_value > r->sym->st_value) ? 1 : -1);
- }
- static void
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement