diff options
author | Anderson Lizardo <anderson.lizardo@openbossa.org> | 2013-01-09 11:19:21 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-01-09 11:09:37 -0800 |
commit | 47f40b5584282296fdbacf12e9caa6a5260aa5bc (patch) | |
tree | b7a6c62c81cefbe1f181b93dcc531d5f4b69d823 /unit/test-sdp.c | |
parent | c71f05f6a169fce7acb9d2c5f045a21be977653d (diff) | |
download | bluez-47f40b5584282296fdbacf12e9caa6a5260aa5bc.tar.gz |
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 }
Diffstat (limited to 'unit/test-sdp.c')
-rw-r--r-- | unit/test-sdp.c | 10 |
1 files 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, \ } |