aboutsummaryrefslogtreecommitdiff
path: root/lib/libk/string
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2023-06-29 21:45:11 +0300
committeraqua <aqua@iserlohn-fortress.net>2023-06-29 21:45:11 +0300
commiteb84566d236df6b0dd4f5ce8fc47d66e55e33654 (patch)
tree7e03ca126781c67336edf9f3ce6888aad23f74e4 /lib/libk/string
parentRework leaf makefiles to be included from top-level (diff)
downloadkernel-eb84566d236df6b0dd4f5ce8fc47d66e55e33654.tar.xz
Fix compiler warnings
Diffstat (limited to 'lib/libk/string')
-rw-r--r--lib/libk/string/itoa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libk/string/itoa.c b/lib/libk/string/itoa.c
index 2db9768..0997345 100644
--- a/lib/libk/string/itoa.c
+++ b/lib/libk/string/itoa.c
@@ -4,7 +4,7 @@
static const char *numbers = "0123456789abcdef";
char *
-utoa(char *p, unsigned x, int base)
+utoa(char *p, unsigned x, unsigned base)
{
p += 3 * sizeof(unsigned);
*--p = '\0';
@@ -18,12 +18,12 @@ utoa(char *p, unsigned x, int base)
}
char *
-itoa(char *p, int x, int base)
+itoa(char *p, int x, unsigned base)
{
const bool is_negative = (x < 0);
if (is_negative) x = -x;
- p = utoa(p, x, base);
+ p = utoa(p, (unsigned)x, base);
if (is_negative) *--p = '-';
return p;