aboutsummaryrefslogtreecommitdiff
path: root/libc/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/print.c')
-rw-r--r--libc/print.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libc/print.c b/libc/print.c
index 84c4975..629a410 100644
--- a/libc/print.c
+++ b/libc/print.c
@@ -20,7 +20,7 @@ int vsprintf(char *str, const char *format, va_list ap)
int i = 0;
char buf = 0;
- char format_buffer[20] = "\0";
+ char format_buffer[20] = { '\0' };
for (; *format; format++) {
if (ready_to_format) {
@@ -79,8 +79,7 @@ int vsprintf(char *str, const char *format, va_list ap)
int vprintf(const char *format, va_list ap)
{
- char buf[1024];
- memset(buf, 0, 1024);
+ char buf[1024] = { 0 };
int len = vsprintf(buf, format, ap);
serial_print(buf); // TODO: Remove temporary serial print
return len;