diff options
Diffstat (limited to 'src/arch/arm')
-rw-r--r-- | src/arch/arm/register.c | 12 |
1 files changed, 4 insertions, 8 deletions
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; |