diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-20 11:31:32 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-20 11:31:32 +0200 |
commit | 2f3211bc2521c2bf050fc26fb78eb2bfd8929329 (patch) | |
tree | d79db582996a7d8145f127e539cfa704c2be60fe /commands | |
parent | 23ec85feebd8b2cf4942e13e9ec7e413df0cd5ef (diff) | |
download | barebox-2f3211bc2521c2bf050fc26fb78eb2bfd8929329.tar.gz barebox-2f3211bc2521c2bf050fc26fb78eb2bfd8929329.tar.xz |
bootm: memmap now returns (void *)-1 for failure. Test for this instead of NULL
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/bootm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/bootm.c b/commands/bootm.c index 9b0a158796..a714910315 100644 --- a/commands/bootm.c +++ b/commands/bootm.c @@ -274,7 +274,7 @@ struct image_handle *map_image(const char *filename, int verify) len = ntohl(header->ih_size); handle->data = memmap(fd, PROT_READ); - if (!handle->data) { + if (handle->data == (void *)-1) { handle->data = xmalloc(len); handle->flags = IH_MALLOC; if (read(fd, handle->data, len) < 0) { |