HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / wmem / wmem_miscutl.c
blob2d533c5a6e52f708956c2d23320f127fcc5c0a7c
1 /* wmem_miscutl.c
2 * Wireshark Memory Manager Misc Utilities
3 * Copyright 2013, Evan Huus <eapache@gmail.com>
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <string.h>
27 #include <glib.h>
29 #include "wmem_core.h"
30 #include "wmem_miscutl.h"
32 void *
33 wmem_memdup(wmem_allocator_t *allocator, const void *source, const size_t size)
35 void *dest;
37 dest = wmem_alloc(allocator, size);
38 memcpy(dest, source, size);
40 return dest;
44 * Editor modelines - http://www.wireshark.org/tools/modelines.html
46 * Local variables:
47 * c-basic-offset: 4
48 * tab-width: 8
49 * indent-tabs-mode: nil
50 * End:
52 * vi: set shiftwidth=4 tabstop=8 expandtab:
53 * :indentSize=4:tabSize=8:noTabs=true: