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

View file

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