wm: teppich

Download patch

ref: 6bc6f739a4dde17d87b49e44304bd51e226d3720
parent: dec1b83948f5021a8fea7e40ff14cb2749336491
author: mkf <mkf@cloud9p.org>
date: Sun Dec 3 02:04:16 EST 2023

libc/strcmp.c: rewrite

--- a/libc/strcmp.c
+++ b/libc/strcmp.c
@@ -1,12 +1,14 @@
 int
 strcmp(char *s1, char *s2)
 {
-	unsigned int c1, c2;
+	char c1, c2;
 
-	for(;;) {
+	while(1)
+	{
 		c1 = *s1++;
 		c2 = *s2++;
-		if(c1 != c2) {
+		if(c1 != c2)
+		{
 			if(c1 > c2)
 				return 1;
 			return -1;