diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/arch/arm/register.c | 12 |
2 files changed, 9 insertions, 8 deletions
@@ -1,3 +1,8 @@ +17-02-25 Cyrille Bagard <nocbos@gmail.com> + + * src/arch/arm/register.c: + Fix ARM register comparison. + 17-02-19 Cyrille Bagard <nocbos@gmail.com> * src/analysis/db/certs.c: diff --git a/src/arch/arm/register.c b/src/arch/arm/register.c index 3cda075..fc7ecde 100644 --- a/src/arch/arm/register.c +++ b/src/arch/arm/register.c @@ -25,6 +25,7 @@ #include "register-int.h" +#include "../../common/sort.h" @@ -44,7 +45,7 @@ static void g_arm_register_finalize(GArmRegister *); static guint g_arm_register_hash(const GArmRegister *); /* Compare un registre avec un autre. */ -static int g_arm_register_compare(const GArmRegister *, const GArmRegister *); +static int g_arm_register_compare(const GArmRegister * const *, const GArmRegister * const *); @@ -188,16 +189,11 @@ static guint g_arm_register_hash(const GArmRegister *reg) * * ******************************************************************************/ -static int g_arm_register_compare(const GArmRegister *a, const GArmRegister *b) +static int g_arm_register_compare(const GArmRegister * const *a, const GArmRegister * const *b) { int result; /* Bilan à retourner */ - if (a->index < b->index) - result = -1; - else if (a->index > b->index) - result = 1; - else - result = 0; + result = sort_unsigned_long((*a)->index, (*b)->index); return result; |