mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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 <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
This commit is contained in:
committed by
Tom Rini
parent
719cacb92e
commit
349d148f16
@@ -101,10 +101,9 @@ size_t strcspn(const char *s, const char *reject);
|
||||
# define strndup sandbox_strndup
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_STRDUP
|
||||
extern char * strdup(const char *);
|
||||
extern char * strndup(const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_STRSWAB
|
||||
extern char * strswab(const char *);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user