aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-18 17:48:53 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-19 01:49:24 +0000
commit59155d1d1c40a979d5f5040e4df35ee72dadbb9c (patch)
treeb110439505b17986a7c6d8097a300143c2f3e893
parent5162b7f146093a35d8bfc0facf88fb55737f9395 (diff)
Eliminate ep_strdup(), as it's no longer used.
Also, remove some no-longer-existent functions from checkAPIs.pl. Change-Id: I2bf11e3ec03a34f9e89d58d560e340d76fd3ddc1 Reviewed-on: https://code.wireshark.org/review/6645 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--debian/libwireshark0.symbols1
-rw-r--r--epan/emem.c25
-rw-r--r--epan/emem.h4
-rwxr-xr-xtools/checkAPIs.pl17
4 files changed, 0 insertions, 47 deletions
diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols
index 60c6aae1d0..4615911cf2 100644
--- a/debian/libwireshark0.symbols
+++ b/debian/libwireshark0.symbols
@@ -439,7 +439,6 @@ libwireshark.so.0 libwireshark0 #MINVER#
empty_tcp_stream@Base 1.9.1
ep_alloc0@Base 1.9.1
ep_alloc@Base 1.9.1
- ep_strdup@Base 1.9.1
ep_strdup_printf@Base 1.9.1
epan_cleanup@Base 1.9.1
epan_dissect_cleanup@Base 1.9.1
diff --git a/epan/emem.c b/epan/emem.c
index c0332b1434..d86fb7135c 100644
--- a/epan/emem.c
+++ b/epan/emem.c
@@ -691,31 +691,6 @@ ep_alloc0(size_t size)
}
static gchar *
-emem_strdup(const gchar *src, void *allocator(size_t))
-{
- guint len;
- gchar *dst;
-
- /* If str is NULL, just return the string "<NULL>" so that the callers don't
- * have to bother checking it.
- */
- if(!src)
- src = "<NULL>";
-
- len = (guint) strlen(src);
- dst = (gchar *)memcpy(allocator(len+1), src, len+1);
-
- return dst;
-}
-
-gchar *
-ep_strdup(const gchar *src)
-{
- return emem_strdup(src, ep_alloc);
-}
-
-
-static gchar *
emem_strdup_vprintf(const gchar *fmt, va_list ap, void *allocator(size_t))
{
va_list ap2;
diff --git a/epan/emem.h b/epan/emem.h
index 2c84bf8bb9..4e790eda1f 100644
--- a/epan/emem.h
+++ b/epan/emem.h
@@ -59,10 +59,6 @@ void *ep_alloc(size_t size) G_GNUC_MALLOC;
WS_DLL_PUBLIC
void* ep_alloc0(size_t size) G_GNUC_MALLOC;
-/** Duplicate a string with a packet lifetime scope */
-WS_DLL_PUBLIC
-gchar* ep_strdup(const gchar* src) G_GNUC_MALLOC;
-
/** Create a formatted string with a packet lifetime scope */
WS_DLL_PUBLIC
gchar* ep_strdup_printf(const gchar* fmt, ...)
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl
index 94843572a6..c4f6d2f2f4 100755
--- a/tools/checkAPIs.pl
+++ b/tools/checkAPIs.pl
@@ -154,24 +154,7 @@ my %APIs = (
# wmem calls should replace all emem calls (see doc/README.wmem)
'ep_alloc',
'ep_alloc0',
- 'ep_strdup',
'ep_strdup_printf',
- 'ep_alloc_array',
- 'ep_alloc_array0',
- 'ep_stack_new',
- 'ep_stack_push',
- 'ep_stack_pop',
- 'ep_stack_peek',
- 'emem_tree_insert32',
- 'emem_tree_lookup32',
- 'emem_tree_lookup32_le',
- 'emem_tree_insert32_array',
- 'emem_tree_lookup32_array',
- 'emem_tree_lookup32_array_le',
- 'emem_tree_insert_string',
- 'emem_tree_lookup_string',
- 'emem_tree_foreach',
- 'emem_print_tree',
# Locale-unsafe APIs
# These may have unexpected behaviors in some locales (e.g.,
# "I" isn't always the upper-case form of "i", and "i" isn't