diff options
author | Max Kellermann <max@duempel.org> | 2013-04-09 01:03:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-04-09 01:03:44 +0200 |
commit | 14df240f5b16822da0901b35f7d0cb053c895129 (patch) | |
tree | a7f3be85b1bbf8f98c42ec34cba91c2fad8ccd0d /src/string_util.h | |
parent | 2090911363a131b2a38d39d3b8458eae02889e57 (diff) | |
download | mpd-14df240f5b16822da0901b35f7d0cb053c895129.tar.gz mpd-14df240f5b16822da0901b35f7d0cb053c895129.tar.xz mpd-14df240f5b16822da0901b35f7d0cb053c895129.zip |
OpusReader: don't use strndup()
Eliminate the fallback strndup() and strnlen() implementations.
Diffstat (limited to 'src/string_util.h')
-rw-r--r-- | src/string_util.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/string_util.h b/src/string_util.h index 62de53873..5b76c980b 100644 --- a/src/string_util.h +++ b/src/string_util.h @@ -23,7 +23,6 @@ #include "gcc.h" #include <stdbool.h> -#include <stdlib.h> /* for size_t */ #ifdef __cplusplus extern "C" { @@ -83,31 +82,6 @@ strchug_fast(char *p) bool string_array_contains(const char *const* haystack, const char *needle); -#ifndef HAVE_STRNLEN - -gcc_pure -size_t -strnlen(const char *s, size_t max); - -#endif - -#if !defined(HAVE_STRNDUP) - -/** - * Duplicates the string to a newly allocated buffer - * copying at most n characters. - * - * @param str a string to duplicate - * @param n maximal number of characters to copy - * @return a pointer to the duplicated string, - * or NULL if memory allocation failed. - */ -gcc_malloc -char * -strndup(const char *str, size_t n); - -#endif - #ifdef __cplusplus } /* extern "C" */ #endif |