libc: Remove unnecessary casts in strcat() and strncat()

This commit is contained in:
apio 2022-11-12 14:15:38 +01:00
parent 6ab246a05e
commit 35829a6998

View File

@ -203,9 +203,9 @@ extern "C"
size_t dest_len = strlen(dest); size_t dest_len = strlen(dest);
size_t i; 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; return dest;
} }
@ -215,9 +215,9 @@ extern "C"
size_t dest_len = strlen(dest); size_t dest_len = strlen(dest);
size_t i; 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; return dest;
} }