OSDN Git Service

tools/smp-tester: Initialize all test data to zero
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 27 Nov 2013 11:44:59 +0000 (13:44 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 28 Nov 2013 14:36:33 +0000 (16:36 +0200)
tools/smp-tester.c

index 5e8fee2..28bc1a0 100644 (file)
@@ -294,12 +294,10 @@ static void test_data_free(void *test_data)
 #define test_smp(name, data, setup, func) \
        do { \
                struct test_data *user; \
-               user = malloc(sizeof(struct test_data)); \
+               user = calloc(1, sizeof(struct test_data)); \
                if (!user) \
                        break; \
                user->hciemu_type = HCIEMU_TYPE_LE; \
-               user->io_id = 0; \
-               user->counter = 0; \
                user->alg_sk = -1; \
                user->test_data = data; \
                tester_add_full(name, data, \