History

lib/string: remove unnecessary #undefs

A few architecture specific string.h functions used to be implemented in terms of preprocessor defines to the corresponding compiler builtins. Since this is no longer the case, remove unused #undefs. Only memcmp is still defined in terms of builtins for a few arches.

Nick Desaulniers committed 5 years ago

Commit ff72daa1 parent 2f787881 file · +0 −4Browse files

Showing the changes to lib/string.c (1 of 1 file). Show all

Unified · Split

lib/string.c+0−4
@@ -85,7 +85,6 @@ EXPORT_SYMBOL(strcasecmp); · 84 unmodified lines
8585 * @dest: Where to copy the string to
8686 * @src: Where to copy the string from
8787 */
88−#undef strcpy
8988 char *strcpy(char *dest, const char *src)
9089 {
9190 char *tmp = dest;
@@ -302,7 +301,6 @@ EXPORT_SYMBOL(stpcpy); · 210 unmodified lines
302301 * @dest: The string to be appended to
303302 * @src: The string to append to it
304303 */
305−#undef strcat
306304 char *strcat(char *dest, const char *src)
307305 {
308306 char *tmp = dest;
@@ -378,7 +376,6 @@ EXPORT_SYMBOL(strlcat); · 69 unmodified lines
378376 * @cs: One string
379377 * @ct: Another string
380378 */
381−#undef strcmp
382379 int strcmp(const char *cs, const char *ct)
383380 {
384381 unsigned char c1, c2;
@@ -958,7 +955,6 @@ EXPORT_SYMBOL(memcmp); · 573 unmodified lines
958955 * while this particular implementation is a simple (tail) call to memcmp, do
959956 * not rely on anything but whether the return value is zero or non-zero.
960957 */
961−#undef bcmp
962958 int bcmp(const void *a, const void *b, size_t len)
963959 {
964960 return memcmp(a, b, len);