1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r18298: fixed mmap failure test

(This used to be commit dee6551dc36789506a59bcd3242f208d5bfd5d6f)
This commit is contained in:
Andrew Tridgell 2006-09-09 09:20:26 +00:00 committed by Gerald (Jerry) Carter
parent bf4a32b73a
commit d6c4147a41

View File

@ -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;
}