From 47f40b5584282296fdbacf12e9caa6a5260aa5bc Mon Sep 17 00:00:00 2001 From: Anderson Lizardo Date: Wed, 9 Jan 2013 11:19:21 -0400 Subject: [PATCH] unit: Rename x_pdu() macro on SDP test program 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 e9cbcdf3a..77a4c6c54 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, \ } -- 2.47.3