lib/libc/string0: Remove better-than-standard strncpy() implementation.

ANSI C doesn't require that strncpy() produced null-terminated string, so
it's basicly useless for string manipulation.
crypto-aes
Paul Sokolovsky 7 years ago
parent 13d9d50fea
commit c6923f52f0
  1. 9
      lib/libc/string0.c

@ -169,15 +169,6 @@ char *strcpy(char *dest, const char *src) {
return dest;
}
char *strncpy(char *dest, const char *src, size_t dest_sz) {
char *d = dest;
while (*src && --dest_sz) {
*d++ = *src++;
}
*d = '\0';
return dest;
}
// needed because gcc optimises strcpy + strcat to this
char *stpcpy(char *dest, const char *src) {
while (*src) {

Loading…
Cancel
Save