From c6923f52f09f03468e6720c7ba8fbdef065eec58 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 2 May 2016 18:53:21 +0300 Subject: [PATCH] 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. --- lib/libc/string0.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/libc/string0.c b/lib/libc/string0.c index be003a1bc1..1b37169edd 100644 --- a/lib/libc/string0.c +++ b/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) {