On 2025/5/7 17:53, Hongbo Li wrote:
On 2025/5/7 16:52, Gao Xiang wrote:
Fixes: b08e804b1dd1 ("erofs-utils: lib: wrap up zeropadding calculation")
Signed-off-by: Gao Xiang <[email protected]>
---
lib/decompress.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/decompress.c b/lib/decompress.c
index 3f553a8..1f9daea 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -9,9 +9,9 @@
#include "erofs/err.h"
#include "erofs/print.h"
-static unsigned int z_erofs_fixup_insize(const u8 *padbuf, unsigned int
padbufsize)
+static inline u32 z_erofs_fixup_insize(const u8 *padbuf, u32 padbufsize)
{
How about using macro to constrain it? Like I send in [1].
There are too many macros related to this, you could check..
[1] https://lore.kernel.org/all/[email protected]/
Thanks,
Hongbo
- unsigned int inputmargin;
+ u32 inputmargin;
for (inputmargin = 0; inputmargin < padbufsize &&
!padbuf[inputmargin]; ++inputmargin);