Using the "raw_data" name makes sense, given the macro is just casting input (raw) data. It will also be reused in other tests with raw input data. Also fix this minor checkpatch.pl error: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parenthesis +#define raw_data(args...) (const unsigned char[]) { args } --- unit/test-sdp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unit/test-sdp.c b/unit/test-sdp.c index e9cbcdf..77a4c6c 100644 --- a/unit/test-sdp.c +++ b/unit/test-sdp.c @@ -51,20 +51,20 @@ struct test_data { struct sdp_pdu *pdu_list; }; -#define x_pdu(args...) (const unsigned char[]) { args } +#define raw_data(args...) ((const unsigned char[]) { args }) #define raw_pdu(args...) \ { \ .valid = true, \ - .raw_data = x_pdu(args), \ - .raw_size = sizeof(x_pdu(args)), \ + .raw_data = raw_data(args), \ + .raw_size = sizeof(raw_data(args)), \ } #define raw_pdu_cont(cont, args...) \ { \ .valid = true, \ - .raw_data = x_pdu(args), \ - .raw_size = sizeof(x_pdu(args)), \ + .raw_data = raw_data(args), \ + .raw_size = sizeof(raw_data(args)), \ .cont_len = cont, \ } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html