aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kcmp.c')
-rw-r--r--kernel/kcmp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/kcmp.c b/kernel/kcmp.c
index e30ac0fe61c3..0aa69ea1d8fd 100644
--- a/kernel/kcmp.c
+++ b/kernel/kcmp.c
@@ -44,11 +44,12 @@ static long kptr_obfuscate(long v, int type)
44 */ 44 */
45static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type) 45static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type)
46{ 46{
47 long ret; 47 long t1, t2;
48 48
49 ret = kptr_obfuscate((long)v1, type) - kptr_obfuscate((long)v2, type); 49 t1 = kptr_obfuscate((long)v1, type);
50 t2 = kptr_obfuscate((long)v2, type);
50 51
51 return (ret < 0) | ((ret > 0) << 1); 52 return (t1 < t2) | ((t1 > t2) << 1);
52} 53}
53 54
54/* The caller must have pinned the task */ 55/* The caller must have pinned the task */