mescc: Mes C Library: Prepare for M2-Planet: strcmp.

* lib/string/strcmp.c: Rewrite C-constructs not supported by M2-Planet.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-05-17 19:29:44 +02:00
parent 0ca159041d
commit c117abe06a
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 5 additions and 4 deletions

View File

@ -23,10 +23,11 @@
int
strcmp (char const *a, char const *b)
{
while (*a && *b && *a == *b)
while (a[0] != 0 && b[0] != 0 && a[0] == b[0])
{
a++;
b++;
a = a + 1;
b = b + 1;
}
return *a - *b;
return a[0] - b[0];
}