diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | monitor_mm.c | 11 |
2 files changed, 16 insertions, 3 deletions
@@ -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 | ||
19 | 20020702 | 25 | 20020702 |
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" |
27 | RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $"); | 27 | RCSID("$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 $"); | |||
38 | static int | 38 | static int |
39 | mm_compare(struct mm_share *a, struct mm_share *b) | 39 | mm_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 | ||
44 | RB_GENERATE(mmtree, mm_share, next, mm_compare) | 51 | RB_GENERATE(mmtree, mm_share, next, mm_compare) |