diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-06-14 19:09:42 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-06-14 19:09:42 +0100 |
commit | d043013fea859f5eb6f677cad28319d093f1dbda (patch) | |
tree | b4dfdb9647e090d86eccd93a16134a71aa5ed368 /src/amiga/map.c | |
parent | a8df98c6fb07b8ddff18a01d7f2f607d9493dd7c (diff) | |
download | libgit2-d043013fea859f5eb6f677cad28319d093f1dbda.tar.gz |
More changes resulting from pull request
Diffstat (limited to 'src/amiga/map.c')
-rwxr-xr-x | src/amiga/map.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/amiga/map.c b/src/amiga/map.c index 643e6c65d..2fb065c8b 100755 --- a/src/amiga/map.c +++ b/src/amiga/map.c @@ -14,9 +14,6 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset) { - int mprot = 0; - int mflag = 0; - GIT_MMAP_VALIDATE(out, len, prot, flags); out->data = NULL; @@ -27,12 +24,12 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs return -1; } - if(out->data = malloc(len)) { + if((out->data = malloc(len))) { p_lseek(fd, offset, SEEK_SET); p_read(fd, out->data, len); } - if (!out->data || out->data == MAP_FAILED) { + if (!out->data || (out->data == MAP_FAILED)) { giterr_set(GITERR_OS, "Failed to mmap. Could not write data"); return -1; } |