summaryrefslogtreecommitdiff
path: root/libelf/libelf_memory.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2019-06-29 15:27:18 +0000
committerEd Maste <emaste@FreeBSD.org>2019-06-29 15:27:18 +0000
commita5b08c1484eac2c6a65e726f550b3189ff84c6c8 (patch)
tree01cd9d6d76e2c378b391422460c6f233ead08179 /libelf/libelf_memory.c
parent2b92b30119ed91ed88f102ba9ecc40cd1c046a65 (diff)
Notes
Diffstat (limited to 'libelf/libelf_memory.c')
-rw-r--r--libelf/libelf_memory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libelf/libelf_memory.c b/libelf/libelf_memory.c
index cb8e8f20438a..12ab12aed70e 100644
--- a/libelf/libelf_memory.c
+++ b/libelf/libelf_memory.c
@@ -31,7 +31,7 @@
#include "_libelf.h"
-ELFTC_VCSID("$Id: libelf_memory.c 3013 2014-03-23 06:16:59Z jkoshy $");
+ELFTC_VCSID("$Id: libelf_memory.c 3738 2019-05-05 21:49:06Z jkoshy $");
/*
* Create an ELF descriptor for a memory image, optionally reporting
@@ -54,7 +54,7 @@ _libelf_memory(unsigned char *image, size_t sz, int reporterror)
e->e_cmd = ELF_C_READ;
e->e_rawfile = image;
- e->e_rawsize = sz;
+ e->e_rawsize = (off_t) sz;
#undef LIBELF_IS_ELF
#define LIBELF_IS_ELF(P) ((P)[EI_MAG0] == ELFMAG0 && \
@@ -78,7 +78,7 @@ _libelf_memory(unsigned char *image, size_t sz, int reporterror)
if (error != ELF_E_NONE) {
if (reporterror) {
LIBELF_PRIVATE(error) = LIBELF_ERROR(error, 0);
- (void) _libelf_release_elf(e);
+ _libelf_release_elf(e);
return (NULL);
}
} else {