diff options
Diffstat (limited to 'minzipold/SysUtil.c')
-rw-r--r-- | minzipold/SysUtil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/minzipold/SysUtil.c b/minzipold/SysUtil.c index 49a2522d6..31c76d6d4 100644 --- a/minzipold/SysUtil.c +++ b/minzipold/SysUtil.c @@ -95,16 +95,16 @@ int sysLoadFileInShmem(int fd, MemMapping* pMap) if (memPtr == NULL) return -1; - actual = read(fd, memPtr, length); + pMap->baseAddr = pMap->addr = memPtr; + pMap->baseLength = pMap->length = length; + + actual = TEMP_FAILURE_RETRY(read(fd, memPtr, length)); if (actual != length) { LOGE("only read %d of %d bytes\n", (int) actual, (int) length); sysReleaseShmem(pMap); return -1; } - pMap->baseAddr = pMap->addr = memPtr; - pMap->baseLength = pMap->length = length; - return 0; } |