wm: teppich

Download patch

ref: 723fef923f921a56f4fed76e549c173fd3408887
parent: dcc535daeb6866c72fe7eea3947702314d9c2f72
author: mkf <mkf@cloud9p.org>
date: Wed Dec 6 18:21:37 EST 2023

scanf: no need for malloc

--- a/libc/scanf.c
+++ b/libc/scanf.c
@@ -1,13 +1,12 @@
 #include <u.h>
 #include <libc.h>
 #include <cons.h>
-#include <mem.h>
 
 static char*
 get_char()
 {
 	int i = 0;
-	char *buff = malloc(10), c;
+	char *buff, c;
 	while (1 == 1)
 	{
 		c = cons_read(defcons);