diff options
author | Ben Straub <bstraub@github.com> | 2012-07-17 08:08:34 -0700 |
---|---|---|
committer | Ben Straub <bstraub@github.com> | 2012-07-17 08:08:34 -0700 |
commit | bfc65634050dc52e3ed6b4497ebbb511e39d6e1e (patch) | |
tree | 32b03847b8a152b69bc3b48b6bb32e7b8621f45e /src/unix/map.c | |
parent | 1d68fcd04b21a2c5665d0ca6a5543e7166c73457 (diff) | |
parent | ea5d2ce4cfa6cec89e2d844a70d1eb24bb401c7d (diff) | |
download | libgit2-bfc65634050dc52e3ed6b4497ebbb511e39d6e1e.tar.gz |
Merge branch 'development' into clone
Diffstat (limited to 'src/unix/map.c')
-rw-r--r-- | src/unix/map.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unix/map.c b/src/unix/map.c index 772f4e247..9dcae5845 100644 --- a/src/unix/map.c +++ b/src/unix/map.c @@ -33,6 +33,7 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs mflag = MAP_PRIVATE; out->data = mmap(NULL, len, mprot, mflag, fd, offset); + if (!out->data || out->data == MAP_FAILED) { giterr_set(GITERR_OS, "Failed to mmap. Could not write data"); return -1; @@ -47,6 +48,7 @@ int p_munmap(git_map *map) { assert(map != NULL); munmap(map->data, map->len); + return 0; } |