summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--monitor_mm.c11
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 014aa9480..99e2bb58b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,12 @@
15 - stevesk@cvs.openbsd.org 2002/06/27 19:49:08 15 - stevesk@cvs.openbsd.org 2002/06/27 19:49:08
16 [ssh-keyscan.c] 16 [ssh-keyscan.c]
17 use convtime(); ok markus@ 17 use convtime(); ok markus@
18 - millert@cvs.openbsd.org 2002/06/28 01:49:31
19 [monitor_mm.c]
20 tree(3) wants an int return value for its compare functions and
21 the difference between two pointers is not an int. Just do the
22 safest thing and store the result in a long and then return 0,
23 -1, or 1 based on that result.
18 24
1920020702 2520020702
20 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc & 26 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc &
@@ -1223,4 +1229,4 @@
1223 - (stevesk) entropy.c: typo in debug message 1229 - (stevesk) entropy.c: typo in debug message
1224 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1230 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1225 1231
1226$Id: ChangeLog,v 1.2319 2002/07/04 00:07:13 mouring Exp $ 1232$Id: ChangeLog,v 1.2320 2002/07/04 00:08:23 mouring Exp $
diff --git a/monitor_mm.c b/monitor_mm.c
index c363036e6..f72a180ea 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $"); 27RCSID("$OpenBSD: monitor_mm.c,v 1.7 2002/06/28 01:49:31 millert Exp $");
28 28
29#ifdef HAVE_SYS_MMAN_H 29#ifdef HAVE_SYS_MMAN_H
30#include <sys/mman.h> 30#include <sys/mman.h>
@@ -38,7 +38,14 @@ RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $");
38static int 38static int
39mm_compare(struct mm_share *a, struct mm_share *b) 39mm_compare(struct mm_share *a, struct mm_share *b)
40{ 40{
41 return ((char *)a->address - (char *)b->address); 41 long diff = (char *)a->address - (char *)b->address;
42
43 if (diff == 0)
44 return (0);
45 else if (diff < 0)
46 return (-1);
47 else
48 return (1);
42} 49}
43 50
44RB_GENERATE(mmtree, mm_share, next, mm_compare) 51RB_GENERATE(mmtree, mm_share, next, mm_compare)