From 14df240f5b16822da0901b35f7d0cb053c895129 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Apr 2013 01:03:44 +0200 Subject: OpusReader: don't use strndup() Eliminate the fallback strndup() and strnlen() implementations. --- src/string_util.h | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/string_util.h') 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 -#include /* 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 -- cgit v1.2.3