Kill more unused emem functions
Change-Id: Ib81410b6d760886f2ae585f44ac58fc135da62c7 Reviewed-on: https://code.wireshark.org/review/6568 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
parent
4fa73961f1
commit
3f575120ea
|
@ -440,11 +440,8 @@ 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_memdup@Base 1.9.1
|
||||
ep_strconcat@Base 1.9.1
|
||||
ep_strdup@Base 1.9.1
|
||||
ep_strdup_printf@Base 1.9.1
|
||||
ep_strdup_vprintf@Base 1.9.1
|
||||
ep_strndup@Base 1.9.1
|
||||
epan_cleanup@Base 1.9.1
|
||||
epan_dissect_cleanup@Base 1.9.1
|
||||
|
|
45
epan/emem.c
45
epan/emem.c
|
@ -987,12 +987,6 @@ ep_strndup(const gchar *src, size_t len)
|
|||
|
||||
|
||||
|
||||
void *
|
||||
ep_memdup(const void* src, size_t len)
|
||||
{
|
||||
return memcpy(ep_alloc(len), src, len);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
emem_strdup_vprintf(const gchar *fmt, va_list ap, void *allocator(size_t))
|
||||
{
|
||||
|
@ -1011,7 +1005,7 @@ emem_strdup_vprintf(const gchar *fmt, va_list ap, void *allocator(size_t))
|
|||
return dst;
|
||||
}
|
||||
|
||||
gchar *
|
||||
static gchar *
|
||||
ep_strdup_vprintf(const gchar *fmt, va_list ap)
|
||||
{
|
||||
return emem_strdup_vprintf(fmt, ap, ep_alloc);
|
||||
|
@ -1029,43 +1023,6 @@ ep_strdup_printf(const gchar *fmt, ...)
|
|||
return dst;
|
||||
}
|
||||
|
||||
gchar *
|
||||
ep_strconcat(const gchar *string1, ...)
|
||||
{
|
||||
gsize l;
|
||||
va_list args;
|
||||
gchar *s;
|
||||
gchar *concat;
|
||||
gchar *ptr;
|
||||
|
||||
if (!string1)
|
||||
return NULL;
|
||||
|
||||
l = 1 + strlen(string1);
|
||||
va_start(args, string1);
|
||||
s = va_arg(args, gchar*);
|
||||
while (s) {
|
||||
l += strlen(s);
|
||||
s = va_arg(args, gchar*);
|
||||
}
|
||||
va_end(args);
|
||||
|
||||
concat = (gchar *)ep_alloc(l);
|
||||
ptr = concat;
|
||||
|
||||
ptr = g_stpcpy(ptr, string1);
|
||||
va_start(args, string1);
|
||||
s = va_arg(args, gchar*);
|
||||
while (s) {
|
||||
ptr = g_stpcpy(ptr, s);
|
||||
s = va_arg(args, gchar*);
|
||||
}
|
||||
va_end(args);
|
||||
|
||||
return concat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* release all allocated memory back to the pool. */
|
||||
static void
|
||||
|
|
10
epan/emem.h
10
epan/emem.h
|
@ -68,21 +68,11 @@ gchar* ep_strdup(const gchar* src) G_GNUC_MALLOC;
|
|||
WS_DLL_PUBLIC
|
||||
gchar* ep_strndup(const gchar* src, size_t len) G_GNUC_MALLOC;
|
||||
|
||||
/** Duplicate a buffer with a packet lifetime scope */
|
||||
WS_DLL_PUBLIC
|
||||
void* ep_memdup(const void* src, size_t len) G_GNUC_MALLOC;
|
||||
|
||||
/** Create a formatted string with a packet lifetime scope */
|
||||
WS_DLL_PUBLIC
|
||||
gchar* ep_strdup_vprintf(const gchar* fmt, va_list ap)
|
||||
G_GNUC_MALLOC G_GNUC_PRINTF(1, 0);
|
||||
WS_DLL_PUBLIC
|
||||
gchar* ep_strdup_printf(const gchar* fmt, ...)
|
||||
G_GNUC_MALLOC G_GNUC_PRINTF(1, 2);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
gchar *ep_strconcat(const gchar *string, ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
|
||||
|
||||
/** release all memory allocated in the previous packet dissection */
|
||||
void ep_free_all(void);
|
||||
|
||||
|
|
|
@ -158,10 +158,7 @@ my %APIs = (
|
|||
'ep_new0',
|
||||
'ep_strdup',
|
||||
'ep_strndup',
|
||||
'ep_memdup',
|
||||
'ep_strdup_vprintf',
|
||||
'ep_strdup_printf',
|
||||
'ep_strconcat',
|
||||
'ep_alloc_array',
|
||||
'ep_alloc_array0',
|
||||
'ep_stack_new',
|
||||
|
|
Loading…
Reference in New Issue