cleanup mmap fake. No need to output anything, callers handle the return value Signed-off-by: Alex Riesen --- compat/mmap.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) 311da12b7aaca9b7329a07807e1ce4afba4bff77 diff --git a/compat/mmap.c b/compat/mmap.c index 55cb120..32d7a30 100644 --- a/compat/mmap.c +++ b/compat/mmap.c @@ -8,15 +8,17 @@ void *gitfakemmap(void *start, size_t le { int n = 0; - if (start != NULL || !(flags & MAP_PRIVATE)) - die("Invalid usage of gitfakemmap."); + if (start != NULL || !(flags & MAP_PRIVATE)) { + errno = ENOTSUP; + return MAP_FAILED; + } if (lseek(fd, offset, SEEK_SET) < 0) { errno = EINVAL; return MAP_FAILED; } - start = xmalloc(length); + start = malloc(length); if (start == NULL) { errno = ENOMEM; return MAP_FAILED; -- 0.99.9.GIT