summaryrefslogtreecommitdiff
path: root/src/amiga/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/amiga/map.c')
-rwxr-xr-xsrc/amiga/map.c7
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;
}