From 8cd492986cce3fc84d2d9884bee0c14689bc2b1a Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Mon, 21 Jul 2014 09:40:21 +0200 Subject: [PATCH] android/tester-ng: Improve callback defining makro This makes CALLBACK_DEVICE_PROPS and CALLBACK_DEVICE_FOUND use more generic CALLBACK_PROPS makro. --- android/tester-main.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/android/tester-main.h b/android/tester-main.h index a5ed5b19d..883ec4d94 100644 --- a/android/tester-main.h +++ b/android/tester-main.h @@ -87,17 +87,17 @@ .callback_result.num_properties = prop_cnt, \ } -#define CALLBACK_DEVICE_PROPS(props, prop_cnt) { \ - .callback = CB_BT_REMOTE_DEVICE_PROPERTIES, \ +#define CALLBACK_PROPS(cb, props, prop_cnt) { \ + .callback = cb, \ .callback_result.properties = props, \ .callback_result.num_properties = prop_cnt, \ } -#define CALLBACK_DEVICE_FOUND(props, prop_cnt) { \ - .callback = CB_BT_DEVICE_FOUND, \ - .callback_result.properties = props, \ - .callback_result.num_properties = prop_cnt, \ - } +#define CALLBACK_DEVICE_PROPS(props, prop_cnt) \ + CALLBACK_PROPS(CB_BT_REMOTE_DEVICE_PROPERTIES, props, prop_cnt) + +#define CALLBACK_DEVICE_FOUND(props, prop_cnt) \ + CALLBACK_PROPS(CB_BT_DEVICE_FOUND, props, prop_cnt) /* * NOTICE: -- 2.47.3