aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/userspace/libc/stdlib')
-rw-r--r--src/userspace/libc/stdlib/atoi.c6
-rw-r--r--src/userspace/libc/stdlib/htoi.c4
-rw-r--r--src/userspace/libc/stdlib/itoa.c2
-rw-r--r--src/userspace/libc/stdlib/malloc.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/userspace/libc/stdlib/atoi.c b/src/userspace/libc/stdlib/atoi.c
index 21b6c25..dbfe0cb 100644
--- a/src/userspace/libc/stdlib/atoi.c
+++ b/src/userspace/libc/stdlib/atoi.c
@@ -5,15 +5,15 @@
int atoi(char *str)
{
- u8 s_str = strlen(str);
+ u32 s_str = strlen(str);
if (!s_str)
return 0;
- u8 negative = 0;
+ u32 negative = 0;
if (str[0] == '-')
negative = 1;
- u8 i = 0;
+ u32 i = 0;
if (negative)
i++;
diff --git a/src/userspace/libc/stdlib/htoi.c b/src/userspace/libc/stdlib/htoi.c
index cf79b7a..8897d20 100644
--- a/src/userspace/libc/stdlib/htoi.c
+++ b/src/userspace/libc/stdlib/htoi.c
@@ -5,9 +5,9 @@
int htoi(char *str)
{
- u8 s_str = strlen(str);
+ u32 s_str = strlen(str);
- u8 i = 0;
+ u32 i = 0;
int ret = 0;
for (; i < s_str; i++) {
char c = str[i];
diff --git a/src/userspace/libc/stdlib/itoa.c b/src/userspace/libc/stdlib/itoa.c
index 8311ad1..b8aa73e 100644
--- a/src/userspace/libc/stdlib/itoa.c
+++ b/src/userspace/libc/stdlib/itoa.c
@@ -13,7 +13,7 @@ char *itoa(int n)
ret[1] = 0;
return ret;
}
- u8 negative = (u8)(n < 0);
+ u32 negative = (u32)(n < 0);
if (negative)
n *= -1;
diff --git a/src/userspace/libc/stdlib/malloc.c b/src/userspace/libc/stdlib/malloc.c
index b738eed..5eb3caa 100644
--- a/src/userspace/libc/stdlib/malloc.c
+++ b/src/userspace/libc/stdlib/malloc.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <syscall.h>
-void *malloc(u8 size)
+void *malloc(u32 size)
{
return (void *)syscall_malloc(size);
} \ No newline at end of file