summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--amideco.c2
-rw-r--r--lh5_extract.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/amideco.c b/amideco.c
index cf952b9..152ba31 100644
--- a/amideco.c
+++ b/amideco.c
@@ -429,7 +429,7 @@ main(int argc, char *argv[])
BIOSOffset = 0x100000 - FileLength;
BIOSImage = mmap(NULL, FileLength, PROT_READ, MAP_PRIVATE, fd, 0);
- if (!BIOSImage) {
+ if (BIOSImage < 0) {
fprintf(stderr, "Error: Failed to mmap %s: %s\n",
FileName, strerror(errno));
return 1;
diff --git a/lh5_extract.c b/lh5_extract.c
index 15bf5b4..92f625c 100644
--- a/lh5_extract.c
+++ b/lh5_extract.c
@@ -618,7 +618,7 @@ main(int argc, char *argv[])
}
PackedBuffer = mmap(NULL, PackedBufferSize, PROT_READ, MAP_PRIVATE, fd, 0);
- if (!PackedBuffer) {
+ if (PackedBuffer < 0) {
fprintf(stderr, "Error: Failed to mmap %s: %s\n",
argv[1], strerror(errno));
return 1;