The offset argument to mmap(2) is not a pointer. Use 0 instead of NULL.

This commit is contained in:
Marcel Moolenaar 2004-09-22 20:26:33 +00:00
parent 08d3edb315
commit 6d77d031fd

View File

@ -72,7 +72,7 @@ _kvm_maphdrs(kvm_t *kd, size_t sz)
}
vm->mmapsize = sz;
vm->mmapbase = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, kd->pmfd, NULL);
vm->mmapbase = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0);
if (vm->mmapbase == MAP_FAILED) {
_kvm_err(kd, kd->program, "cannot mmap corefile");
return (-1);