summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-02 18:53:21 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-02 18:53:21 +0300
commitc6923f52f09f03468e6720c7ba8fbdef065eec58 (patch)
tree27275d59b6222735f6451c328f6e86b9d057e7c4
parent13d9d50fea53550fdcc7f2bec86ff83b1ff9dc28 (diff)
downloadmicropython-c6923f52f09f03468e6720c7ba8fbdef065eec58.tar.gz
micropython-c6923f52f09f03468e6720c7ba8fbdef065eec58.zip
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.
-rw-r--r--lib/libc/string0.c9
1 files changed, 0 insertions, 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) {