aboutsummaryrefslogtreecommitdiff
path: root/lib/libk/string
diff options
context:
space:
mode:
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;