mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Update strcpy(3) and wcscpy(3) to current coding conventions.
This commit is contained in:
parent
8ce7f2f41f
commit
2bbbc11246
2 changed files with 10 additions and 10 deletions
|
@ -26,9 +26,9 @@
|
|||
|
||||
extern "C" char* strcpy(char* dest, const char* src)
|
||||
{
|
||||
char* origdest = dest;
|
||||
while ( *src )
|
||||
*dest++ = *src++;
|
||||
*dest = '\0';
|
||||
return origdest;
|
||||
size_t index;
|
||||
for ( index = 0; src[index]; index++ )
|
||||
dest[index] = src[index];
|
||||
dest[index] = '\0';
|
||||
return dest;
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
extern "C" wchar_t* wcscpy(wchar_t* dest, const wchar_t* src)
|
||||
{
|
||||
wchar_t* origdest = dest;
|
||||
while ( *src )
|
||||
*dest++ = *src++;
|
||||
*dest = '\0';
|
||||
return origdest;
|
||||
size_t index;
|
||||
for ( index = 0; src[index]; index++ )
|
||||
dest[index] = src[index];
|
||||
dest[index] = '\0';
|
||||
return dest;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue