diff options
| author | Rasmus Villemoes <[email protected]> | 2026-04-21 09:54:33 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-12 15:38:00 -0600 |
| commit | 349d148f16d83da3b1e3475be0e43bfda4f4ab71 (patch) | |
| tree | 581addc68b59cb53a95c63d3f33b3f418707d12a /lib/string.c | |
| parent | 719cacb92e039308e23cbd6b653275e939a5aca5 (diff) | |
lib/string.c: drop pointless __HAVE_ARCH_STRDUP
There has never been an arch-specific optimized implementation of
str[n]dup, nor is there likely to ever be one, because unlike their
cousins strlen(), strcpy() and similar that simply read/write the
src/dst, the dup functions by definition involve memory allocation. So
drop this irrelevant cpp guard.
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Rasmus Villemoes <[email protected]>
Diffstat (limited to 'lib/string.c')
| -rw-r--r-- | lib/string.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/string.c b/lib/string.c index c2813e0f854..2c1baa568b9 100644 --- a/lib/string.c +++ b/lib/string.c @@ -343,7 +343,6 @@ size_t strcspn(const char *s, const char *reject) } #endif -#ifndef __HAVE_ARCH_STRDUP char * strdup(const char *s) { char *new; @@ -379,7 +378,6 @@ char * strndup(const char *s, size_t n) return new; } -#endif #ifndef __HAVE_ARCH_STRSPN /** |
