1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Mon, 24 Nov 2025 18:00:08 +0100
Subject: Replace open-coded printf("%u") (Closes: #1121263)
---
C/Util/Lzma/LzmaUtil.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/C/Util/Lzma/LzmaUtil.c b/C/Util/Lzma/LzmaUtil.c
index 2c82085..2d9c996 100644
--- a/C/Util/Lzma/LzmaUtil.c
+++ b/C/Util/Lzma/LzmaUtil.c
@@ -45,24 +45,9 @@ static int PrintError(const char *message)
return 1;
}
-#define CONVERT_INT_TO_STR(charType, tempSize) \
- unsigned char temp[tempSize]; unsigned i = 0; \
- while (val >= 10) { temp[i++] = (unsigned char)('0' + (unsigned)(val % 10)); val /= 10; } \
- *s++ = (charType)('0' + (unsigned)val); \
- while (i != 0) { i--; *s++ = (charType)temp[i]; } \
- *s = 0; \
- return s;
-
-static char * Convert_unsigned_To_str(unsigned val, char *s)
-{
- CONVERT_INT_TO_STR(char, 32)
-}
-
static void Print_unsigned(unsigned code)
{
- char str[32];
- Convert_unsigned_To_str(code, str);
- Print(str);
+ fprintf(stdout, "%u", code);
}
static int PrintError_WRes(const char *message, WRes wres)
|