summaryrefslogtreecommitdiffstats
path: root/contrib/file/readelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file/readelf.c')
-rw-r--r--contrib/file/readelf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/file/readelf.c b/contrib/file/readelf.c
index 69318fa..dd9004b 100644
--- a/contrib/file/readelf.c
+++ b/contrib/file/readelf.c
@@ -37,7 +37,7 @@
#include "readelf.h"
#ifndef lint
-FILE_RCSID("@(#)$Id: readelf.c,v 1.61 2006/11/15 15:53:23 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.63 2007/01/16 14:56:45 ljt Exp $")
#endif
#ifdef ELFCORE
@@ -155,7 +155,7 @@ getu64(int swap, uint64_t value)
#define xph_type (class == ELFCLASS32 \
? getu32(swap, ph32.p_type) \
: getu32(swap, ph64.p_type))
-#define xph_offset (class == ELFCLASS32 \
+#define xph_offset (off_t)(class == ELFCLASS32 \
? getu32(swap, ph32.p_offset) \
: getu64(swap, ph64.p_offset))
#define xph_align (size_t)((class == ELFCLASS32 \
@@ -293,7 +293,7 @@ dophn_core(struct magic_set *ms, int class, int swap, int fd, off_t off,
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
- if (lseek(fd, (off_t)xph_offset, SEEK_SET) == (off_t)-1) {
+ if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
@@ -858,7 +858,7 @@ dophn_exec(struct magic_set *ms, int class, int swap, int fd, off_t off,
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
- if (lseek(fd, (off_t)xph_offset, SEEK_SET)
+ if (lseek(fd, xph_offset, SEEK_SET)
== (off_t)-1) {
file_badseek(ms);
return -1;
OpenPOWER on IntegriCloud