summaryrefslogtreecommitdiff
path: root/unit/test-hog.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-03-27 10:47:37 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-03-27 10:49:34 +0200
commite7caff69df6b761bc0ee94e3d392eb7c656550d1 (patch)
tree7179b0ebf82d2c7641c51236b5fef060737ef725 /unit/test-hog.c
parent43bfe924890134cf4aadefe9a61cb0c81870907b (diff)
downloadbluez-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.c3
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)