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
@@ -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
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user