diff options
Diffstat (limited to 'usr.bin/ssh/monitor_mm.c')
-rw-r--r-- | usr.bin/ssh/monitor_mm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/monitor_mm.c b/usr.bin/ssh/monitor_mm.c index c6ea2085011..acd90ff1309 100644 --- a/usr.bin/ssh/monitor_mm.c +++ b/usr.bin/ssh/monitor_mm.c @@ -24,7 +24,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $"); +RCSID("$OpenBSD: monitor_mm.c,v 1.7 2002/06/28 01:49:31 millert Exp $"); #include <sys/mman.h> @@ -36,7 +36,14 @@ RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $"); static int mm_compare(struct mm_share *a, struct mm_share *b) { - return ((char *)a->address - (char *)b->address); + long diff = (char *)a->address - (char *)b->address; + + if (diff == 0) + return (0); + else if (diff < 0) + return (-1); + else + return (1); } RB_GENERATE(mmtree, mm_share, next, mm_compare) |