summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}