From e325998aab1fdf7c8b616133ebbd6f6cc2b77bde Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 26 Mar 2015 18:18:13 +0900 Subject: [PATCH] Bug 1142434 - Remove moz_strdup/moz_strndup, nothing uses them. r=njn --- memory/mozalloc/mozalloc.cpp | 10 ---------- memory/mozalloc/mozalloc.h | 6 ------ 2 files changed, 16 deletions(-) diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp index 240b84f507c..f333e4e2611 100644 --- a/memory/mozalloc/mozalloc.cpp +++ b/memory/mozalloc/mozalloc.cpp @@ -141,11 +141,6 @@ moz_xstrdup(const char* str) } return dup; } -char* -moz_strdup(const char* str) -{ - return strdup_impl(str); -} #if defined(HAVE_STRNDUP) char* @@ -158,11 +153,6 @@ moz_xstrndup(const char* str, size_t strsize) } return dup; } -char* -moz_strndup(const char* str, size_t strsize) -{ - return strndup_impl(str, strsize); -} #endif // if defined(HAVE_STRNDUP) #if defined(HAVE_POSIX_MEMALIGN) diff --git a/memory/mozalloc/mozalloc.h b/memory/mozalloc/mozalloc.h index d62e984231c..643a13dd9e2 100644 --- a/memory/mozalloc/mozalloc.h +++ b/memory/mozalloc/mozalloc.h @@ -90,9 +90,6 @@ MFBT_API void* moz_realloc(void* ptr, size_t size) MFBT_API char* moz_xstrdup(const char* str) NS_ATTR_MALLOC NS_WARN_UNUSED_RESULT; -MFBT_API char* moz_strdup(const char* str) - NS_ATTR_MALLOC NS_WARN_UNUSED_RESULT; - MFBT_API size_t moz_malloc_usable_size(void *ptr); MFBT_API size_t moz_malloc_size_of(const void *ptr); @@ -100,9 +97,6 @@ MFBT_API size_t moz_malloc_size_of(const void *ptr); #if defined(HAVE_STRNDUP) MFBT_API char* moz_xstrndup(const char* str, size_t strsize) NS_ATTR_MALLOC NS_WARN_UNUSED_RESULT; - -MFBT_API char* moz_strndup(const char* str, size_t strsize) - NS_ATTR_MALLOC NS_WARN_UNUSED_RESULT; #endif /* if defined(HAVE_STRNDUP) */