Merge branch 'shell' into acpi
This commit is contained in:
commit
57ad3aae80
|
@ -39,9 +39,8 @@ int strcmp(const char *str1, const char *str2)
|
||||||
//
|
//
|
||||||
int strncmp(const char *str1, const char *str2, size_t n)
|
int strncmp(const char *str1, const char *str2, size_t n)
|
||||||
{
|
{
|
||||||
size_t it = 0;
|
while (n && *str1 && *str1 == *str2) str1++, str2++, n--;
|
||||||
|
if (!n) return 0;
|
||||||
while (*str1 == *str2 && *str2 && it < n) str1++, str2++, it++;
|
|
||||||
|
|
||||||
return *(uchar *)str1 - *(uchar *)str2;
|
return *(uchar *)str1 - *(uchar *)str2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue