summaryrefslogtreecommitdiff
path: root/arch/s390/lib/string.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2025-04-11 15:29:10 +0200
committerHeiko Carstens <hca@linux.ibm.com>2025-04-17 15:16:10 +0200
commite7b3f9a05889d662f05808ae990f531821c5f760 (patch)
treeab52a8a0671ba965f9a7c7dbacb0450ab10ec414 /arch/s390/lib/string.c
parent1c745df519d7b9ba7d3c5f9f40bf2f04ce955b39 (diff)
s390/string: Remove optimized strncpy()
There are hardly any strncpy() users left, therefore drop the optimized s390 variant. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/lib/string.c')
-rw-r--r--arch/s390/lib/string.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c
index 373fa1f01937..cc00804c6dac 100644
--- a/arch/s390/lib/string.c
+++ b/arch/s390/lib/string.c
@@ -102,26 +102,6 @@ EXPORT_SYMBOL(strcpy);
#endif
/**
- * strncpy - Copy a length-limited, %NUL-terminated string
- * @dest: Where to copy the string to
- * @src: Where to copy the string from
- * @n: The maximum number of bytes to copy
- *
- * The result is not %NUL-terminated if the source exceeds
- * @n bytes.
- */
-#ifdef __HAVE_ARCH_STRNCPY
-char *strncpy(char *dest, const char *src, size_t n)
-{
- size_t len = __strnend(src, n) - src;
- memset(dest + len, 0, n - len);
- memcpy(dest, src, len);
- return dest;
-}
-EXPORT_SYMBOL(strncpy);
-#endif
-
-/**
* strcat - Append one %NUL-terminated string to another
* @dest: The string to be appended to
* @src: The string to append to it
@@ -181,9 +161,6 @@ EXPORT_SYMBOL(strlcat);
* @n: The maximum numbers of bytes to copy
*
* returns a pointer to @dest
- *
- * Note that in contrast to strncpy, strncat ensures the result is
- * terminated.
*/
#ifdef __HAVE_ARCH_STRNCAT
char *strncat(char *dest, const char *src, size_t n)