in string.cpp of the 'lib' part of the kernel, you have the following function is defined
Code: Select all
//! copies string s2 to s1
char *strcpy(char *s1, const char *s2)
{
char *s1_p = s1;
while (*s1++ = *s2++);
return s1_p;
}
My suggesting would be:
Code: Select all
//! copies string s2 to s1
char *strcpy(char *s1, const char *s2)
{
char *s1_p = s1;
while (*s1)
*s1++ = *s2++;
return s1_p;
}