From d6c4147a41fb37ea78c62cd10173f100c9a9e9c3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Sep 2006 09:20:26 +0000 Subject: r18298: fixed mmap failure test (This used to be commit dee6551dc36789506a59bcd3242f208d5bfd5d6f) --- source4/lib/registry/reg_backend_w95.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/registry/reg_backend_w95.c b/source4/lib/registry/reg_backend_w95.c index 6624f3c8a0..05b84fdc61 100644 --- a/source4/lib/registry/reg_backend_w95.c +++ b/source4/lib/registry/reg_backend_w95.c @@ -204,7 +204,7 @@ static WERROR w95_open_reg (struct registry_hive *h, struct registry_key **root) creg->base = mmap(0, creg->sbuf.st_size, PROT_READ, MAP_SHARED, creg->fd, 0); - if ((int)creg->base == 1) { + if (creg->base == (void *)-1) { DEBUG(0,("Could not mmap file: %s, %s\n", h->location, strerror(errno))); return WERR_FOOBAR; } -- cgit