From 5abb578e477cfc9faf49a54cfce8edace94aba3e Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Sat, 3 Jan 2015 01:12:46 +0100 Subject: [PATCH] p_djgpp2.{cpp,h}: remove usage of "long". --- src/p_djgpp2.cpp | 6 +++--- src/p_djgpp2.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_djgpp2.cpp b/src/p_djgpp2.cpp index 85684214..2234b7b2 100644 --- a/src/p_djgpp2.cpp +++ b/src/p_djgpp2.cpp @@ -138,16 +138,16 @@ void PackDjgpp2::handleStub(OutputFile *fo) } -static bool is_dlm(InputFile *fi, long coff_offset) +static bool is_dlm(InputFile *fi, unsigned coff_offset) { unsigned char buf[4]; - long off; + unsigned off; try { fi->seek(coff_offset, SEEK_SET); fi->readx(buf, 4); off = get_le32(buf); - if (off < 0 || off > coff_offset + 4) + if (off > coff_offset + 4) return false; fi->seek(off, SEEK_SET); fi->readx(buf, 4); diff --git a/src/p_djgpp2.h b/src/p_djgpp2.h index ac044d42..9edfca48 100644 --- a/src/p_djgpp2.h +++ b/src/p_djgpp2.h @@ -64,7 +64,7 @@ protected: virtual void buildLoader(const Filter *ft); virtual Linker* newLinker() const; - long coff_offset; + unsigned coff_offset; __packed_struct(external_scnhdr_t) char _[12]; // name, paddr