diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-03-27 10:47:37 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-03-27 10:49:34 +0200 |
commit | e7caff69df6b761bc0ee94e3d392eb7c656550d1 (patch) | |
tree | 7179b0ebf82d2c7641c51236b5fef060737ef725 /unit/test-hog.c | |
parent | 43bfe924890134cf4aadefe9a61cb0c81870907b (diff) | |
download | bluez-e7caff69df6b761bc0ee94e3d392eb7c656550d1.tar.gz |
unit: Replace use of g_malloc+memcpy with gmemdup
This seems to fix problems of make check not working in 32 bit systems
with gcc 5.0.
Diffstat (limited to 'unit/test-hog.c')
-rw-r--r-- | unit/test-hog.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/unit/test-hog.c b/unit/test-hog.c index 2a25d095e..778f08791 100644 --- a/unit/test-hog.c +++ b/unit/test-hog.c @@ -81,8 +81,7 @@ struct context { }; \ static struct test_data data; \ data.test_name = g_strdup(name); \ - data.pdu_list = g_malloc(sizeof(pdus)); \ - memcpy(data.pdu_list, pdus, sizeof(pdus)); \ + data.pdu_list = g_memdup(pdus, sizeof(pdus)); \ tester_add(name, &data, NULL, function, NULL); \ } while (0) |