summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/string/strcmp.c
blob: 808bd8370ddeca3a2cfc124601cbd6012be89f80 (plain)
1
2
3
4
5
6
7
#include <string.h>

int strcmp(const char *l, const char *r)
{
	for (; *l==*r && *l; l++, r++);
	return *(unsigned char *)l - *(unsigned char *)r;
}