diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2016-08-30 17:03:55 +0200 |
---|---|---|
committer | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2016-08-30 17:03:55 +0200 |
commit | 5af962df4dda65216b83d0a954ea355296517f4b (patch) | |
tree | 17190557687e9dadf89779e91f74d8c884ccbd88 /gdb/thread.c | |
parent | b2b383620e85d6611044a1d98869831074ccb2f2 (diff) | |
download | binutils-gdb-5af962df4dda65216b83d0a954ea355296517f4b.tar.gz |
Fix order of inferiors in "thread apply all"
This inserts missing parentheses in the calculation of the comparison
result between two different inferior numbers. The problem was found by
Philipp Rudo.
gdb/ChangeLog:
* thread.c (tp_array_compar): Insert missing parentheses.
gdb/testsuite/ChangeLog:
* gdb.multi/tids.exp: Test "thread apply all".
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index ab98777b44d..a66a2b5338e 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -1725,7 +1725,7 @@ tp_array_compar (const void *ap_voidp, const void *bp_voidp) if (a->inf->num != b->inf->num) { - return ((a->inf->num > b->inf->num) - (a->inf->num < b->inf->num) + return (((a->inf->num > b->inf->num) - (a->inf->num < b->inf->num)) * (tp_array_compar_ascending ? +1 : -1)); } |