Clarify call to upx_compress(); NFC

modified:   p_unix.cpp
This commit is contained in:
John Reiser 2024-11-18 16:04:48 -08:00
parent 3d6b2e4617
commit 3d9fc7ab53

View File

@ -405,8 +405,10 @@ void PackUnix::packExtent(
unsigned hdr_c_len = 0; unsigned hdr_c_len = 0;
MemBuffer hdr_obuf; MemBuffer hdr_obuf;
hdr_obuf.allocForCompression(hdr_u_len); hdr_obuf.allocForCompression(hdr_u_len);
int r = upx_compress(hdr_ibuf, hdr_u_len, hdr_obuf, &hdr_c_len, nullptr, int r = upx_compress(hdr_ibuf, hdr_u_len, hdr_obuf, &hdr_c_len,
ph_forced_method(ph.method), 10, nullptr, nullptr); /* &progress callback */ nullptr,
ph_forced_method(ph.method), 10,
/* &config_t */ nullptr, /* &result_t */ nullptr);
if (r != UPX_E_OK) if (r != UPX_E_OK)
throwInternalError("header compression failed"); throwInternalError("header compression failed");
if (hdr_c_len >= hdr_u_len) if (hdr_c_len >= hdr_u_len)