1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2014-09-24 21:01:51 +02:00
parent 8ce7f2f41f
commit 2bbbc11246
2 changed files with 10 additions and 10 deletions

View file

@ -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;
}

View file

@ -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;
}