diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-17 22:10:26 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-17 22:10:26 +0200 |
commit | 7c19e6d2e540690eb1903f05ed7e416caea59c4e (patch) | |
tree | 4a0f8c386d75acc377cfde713d1109a18e554867 /tools/smp-tester.c | |
parent | f4b0ae435f8a3b8f2c628db578ce947467e9490b (diff) | |
download | bluez-7c19e6d2e540690eb1903f05ed7e416caea59c4e.tar.gz |
tools/smp-tester: Use consistent name for test data variable
Diffstat (limited to 'tools/smp-tester.c')
-rw-r--r-- | tools/smp-tester.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tools/smp-tester.c b/tools/smp-tester.c index 2747f2784..e09c80283 100644 --- a/tools/smp-tester.c +++ b/tools/smp-tester.c @@ -404,35 +404,34 @@ static void pair_device_complete(uint8_t status, uint16_t length, tester_test_passed(); } -static const void *get_pdu(const uint8_t *data) +static const void *get_pdu(const uint8_t *pdu) { - struct test_data *test_data = tester_get_data(); - uint8_t opcode = data[0]; + struct test_data *data = tester_get_data(); + uint8_t opcode = pdu[0]; static uint8_t buf[17]; switch (opcode) { case 0x01: /* Pairing Request */ - memcpy(test_data->preq, data, sizeof(test_data->preq)); + memcpy(data->preq, pdu, sizeof(data->preq)); break; case 0x02: /* Pairing Response */ - memcpy(test_data->prsp, data, sizeof(test_data->prsp)); + memcpy(data->prsp, pdu, sizeof(data->prsp)); break; case 0x03: /* Pairing Confirm */ - buf[0] = data[0]; - bt_crypto_c1(test_data->crypto, test_data->tk, test_data->prnd, - test_data->prsp, test_data->preq, - test_data->ia_type, test_data->ia, - test_data->ra_type, test_data->ra, &buf[1]); + buf[0] = pdu[0]; + bt_crypto_c1(data->crypto, data->tk, data->prnd, data->prsp, + data->preq, data->ia_type, data->ia, + data->ra_type, data->ra, &buf[1]); return buf; case 0x04: /* Pairing Random */ - buf[0] = data[0]; - memcpy(&buf[1], test_data->prnd, 16); + buf[0] = pdu[0]; + memcpy(&buf[1], data->prnd, 16); return buf; default: break; } - return data; + return pdu; } static bool verify_random(const uint8_t rnd[16]) |