libc: Remove unnecessary casts in strcat() and strncat()
This commit is contained in:
parent
6ab246a05e
commit
35829a6998
@ -203,9 +203,9 @@ extern "C"
|
||||
size_t dest_len = strlen(dest);
|
||||
size_t i;
|
||||
|
||||
for (i = 0; *(src + i); i++) *(char*)(dest + dest_len + i) = *(const char*)(src + i);
|
||||
for (i = 0; *(src + i); i++) *(dest + dest_len + i) = *(src + i);
|
||||
|
||||
*(char*)(dest + dest_len + i) = '\0';
|
||||
*(dest + dest_len + i) = '\0';
|
||||
|
||||
return dest;
|
||||
}
|
||||
@ -215,9 +215,9 @@ extern "C"
|
||||
size_t dest_len = strlen(dest);
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < max && *(src + i); i++) *(char*)(dest + dest_len + i) = *(const char*)(src + i);
|
||||
for (i = 0; i < max && *(src + i); i++) *(dest + dest_len + i) = *(src + i);
|
||||
|
||||
*(char*)(dest + dest_len + i) = '\0';
|
||||
*(dest + dest_len + i) = '\0';
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user