From e8a3bcca11f5994778beaf073b7c2223de3f67d1 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 14 Jul 2005 00:33:36 -0700 Subject: [PATCH] --- yaml --- r: 4801 b: refs/heads/master c: 1feb8d2d7396748fb3bd6795d09bbfbdd4c03dff h: refs/heads/master i: 4799: 26d5edac824e7f553bd499ebd2a04d799ab24cd2 v: v3 --- [refs] | 2 +- trunk/arch/um/sys-i386/unmap.c | 2 +- trunk/arch/um/sys-x86_64/unmap.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 4e72469d457b..ffe743ad67fb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bcb01b8a67476e6f748086e626df8424cc27036d +refs/heads/master: 1feb8d2d7396748fb3bd6795d09bbfbdd4c03dff diff --git a/trunk/arch/um/sys-i386/unmap.c b/trunk/arch/um/sys-i386/unmap.c index 136875263d27..1b0ad0e4adcd 100644 --- a/trunk/arch/um/sys-i386/unmap.c +++ b/trunk/arch/um/sys-i386/unmap.c @@ -15,7 +15,7 @@ int switcheroo(int fd, int prot, void *from, void *to, int size) if(munmap(to, size) < 0){ return(-1); } - if(mmap2(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) != to){ + if(mmap2(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) == (void*) -1 ){ return(-1); } if(munmap(from, size) < 0){ diff --git a/trunk/arch/um/sys-x86_64/unmap.c b/trunk/arch/um/sys-x86_64/unmap.c index bc7094cce47e..f4a4bffd8a18 100644 --- a/trunk/arch/um/sys-x86_64/unmap.c +++ b/trunk/arch/um/sys-x86_64/unmap.c @@ -15,7 +15,7 @@ int switcheroo(int fd, int prot, void *from, void *to, int size) if(munmap(to, size) < 0){ return(-1); } - if(mmap(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) != to){ + if(mmap(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) == (void*) -1){ return(-1); } if(munmap(from, size) < 0){