mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Pacify clang-tidy
This commit is contained in:
parent
053e95033f
commit
905bfacf44
|
@ -321,7 +321,7 @@ upx_off_t OutputFile::seek(upx_off_t off, int whence) {
|
|||
void OutputFile::set_extent(upx_off_t offset, upx_off_t length) {
|
||||
super::set_extent(offset, length);
|
||||
bytes_written = 0;
|
||||
if (0 == offset && (upx_off_t) ~0u == length) {
|
||||
if (0 == offset && ~(upx_off_t) 0 == length) {
|
||||
if (::fstat(_fd, &st) != 0)
|
||||
throwIOException(_name, errno);
|
||||
_length = st.st_size - offset;
|
||||
|
|
|
@ -386,6 +386,9 @@ PackLinuxElf32::PackLinuxElf32help1(InputFile *f)
|
|||
|
||||
off_t PackLinuxElf::pack3(OutputFile *fo, Filter &ft) // return length of output
|
||||
{
|
||||
if (!fo) {
|
||||
return 0;
|
||||
}
|
||||
unsigned disp;
|
||||
unsigned len = sz_pack2a; // after headers and all PT_LOAD
|
||||
|
||||
|
@ -4030,7 +4033,7 @@ void PackLinuxElf32x86::pack1(OutputFile *fo, Filter &ft)
|
|||
|
||||
void PackBSDElf32x86::pack1(OutputFile *fo, Filter &ft)
|
||||
{
|
||||
PackLinuxElf32::pack1(fo, ft);
|
||||
super::pack1(fo, ft);
|
||||
if (0!=xct_off) // shared library
|
||||
return;
|
||||
generateElfHdr(fo, stub_i386_bsd_elf_fold, getbrk(phdri, e_phnum) );
|
||||
|
|
|
@ -255,7 +255,7 @@ void Packer::addFilter32(int filter_id) {
|
|||
addLoader("MRUBYTE2");
|
||||
} else if (mrupwr2) {
|
||||
addLoader("MRUBITS2");
|
||||
} else if (n_mru) {
|
||||
} else {
|
||||
addLoader("MRUARB20");
|
||||
}
|
||||
addLoader("LXMRU057");
|
||||
|
|
Loading…
Reference in New Issue
Block a user