mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-25 03:12:10 +00:00
- millert@cvs.openbsd.org 2002/06/28 01:49:31
[monitor_mm.c] tree(3) wants an int return value for its compare functions and the difference between two pointers is not an int. Just do the safest thing and store the result in a long and then return 0, -1, or 1 based on that result.
This commit is contained in:
parent
edd098b196
commit
a79616278e
@ -15,6 +15,12 @@
|
|||||||
- stevesk@cvs.openbsd.org 2002/06/27 19:49:08
|
- stevesk@cvs.openbsd.org 2002/06/27 19:49:08
|
||||||
[ssh-keyscan.c]
|
[ssh-keyscan.c]
|
||||||
use convtime(); ok markus@
|
use convtime(); ok markus@
|
||||||
|
- millert@cvs.openbsd.org 2002/06/28 01:49:31
|
||||||
|
[monitor_mm.c]
|
||||||
|
tree(3) wants an int return value for its compare functions and
|
||||||
|
the difference between two pointers is not an int. Just do the
|
||||||
|
safest thing and store the result in a long and then return 0,
|
||||||
|
-1, or 1 based on that result.
|
||||||
|
|
||||||
20020702
|
20020702
|
||||||
- (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc &
|
- (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc &
|
||||||
@ -1223,4 +1229,4 @@
|
|||||||
- (stevesk) entropy.c: typo in debug message
|
- (stevesk) entropy.c: typo in debug message
|
||||||
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2319 2002/07/04 00:07:13 mouring Exp $
|
$Id: ChangeLog,v 1.2320 2002/07/04 00:08:23 mouring Exp $
|
||||||
|
11
monitor_mm.c
11
monitor_mm.c
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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 $");
|
||||||
|
|
||||||
#ifdef HAVE_SYS_MMAN_H
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
@ -38,7 +38,14 @@ RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $");
|
|||||||
static int
|
static int
|
||||||
mm_compare(struct mm_share *a, struct mm_share *b)
|
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)
|
RB_GENERATE(mmtree, mm_share, next, mm_compare)
|
||||||
|
Loading…
Reference in New Issue
Block a user