commit 1d8969baa52c6ee8981869fd67c8c22cd0707fad
parent da15e0d9945be83baead323b081ec436d5852b57
Author: Michael Forney <mforney@mforney.org>
Date: Mon, 25 Mar 2024 23:32:30 -0700
tests/cc: Fix loop condition in execute/0169-string.c cmp() function
We want to check that the strings are the same, not that every
character is different.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/cc/execute/0169-string.c b/tests/cc/execute/0169-string.c
@@ -7,7 +7,7 @@ char *p = "foo";
int
cmp(char *s1, char *s2)
{
- while (*s1 && *s1++ != *s2++)
+ while (*s1 && *s1++ == *s2++)
;
return *s1;
}