summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-09 09:20:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:04 -0500
commitd6c4147a41fb37ea78c62cd10173f100c9a9e9c3 (patch)
tree7d07e2a5b0ec0fbbf1d71b0309c15ca8188c7731 /source4/lib
parentbf4a32b73aa2d9eeca47a8b6ed9cf5b1e9c6f287 (diff)
downloadsamba-d6c4147a41fb37ea78c62cd10173f100c9a9e9c3.tar.gz
samba-d6c4147a41fb37ea78c62cd10173f100c9a9e9c3.tar.bz2
samba-d6c4147a41fb37ea78c62cd10173f100c9a9e9c3.zip
r18298: fixed mmap failure test
(This used to be commit dee6551dc36789506a59bcd3242f208d5bfd5d6f)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/reg_backend_w95.c2
1 files changed, 1 insertions, 1 deletions
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;
}