Massive code clean up: (Fixes Issue 161)

- Remove typedef from internal structs
- Remove _t suffix from types
- Fix tests using connstrings
This commit is contained in:
Audrey Diacre 2011-11-23 15:55:40 +00:00
parent 55daa29a7c
commit c718fafee7
47 changed files with 546 additions and 533 deletions

View file

@ -14,31 +14,31 @@ void
test_access_storm (void)
{
int n = NTESTS;
nfc_device_desc_t devices[MAX_DEVICE_COUNT];
nfc_connstring connstrings[MAX_DEVICE_COUNT];
size_t device_count, ref_device_count, target_count;
bool res;
nfc_list_devices (devices, MAX_DEVICE_COUNT, &ref_device_count);
nfc_list_devices (connstrings, MAX_DEVICE_COUNT, &ref_device_count);
if (!ref_device_count)
cut_omit ("No NFC device found");
while (n) {
size_t i;
nfc_list_devices (devices, MAX_DEVICE_COUNT, &device_count);
nfc_list_devices (connstrings, MAX_DEVICE_COUNT, &device_count);
cut_assert_equal_int (ref_device_count, device_count, cut_message ("device count"));
for (i = 0; i < device_count; i++) {
nfc_device_t *device;
nfc_target_t ant[MAX_TARGET_COUNT];
nfc_device *device;
nfc_target ant[MAX_TARGET_COUNT];
device = nfc_connect (&(devices[i]));
device = nfc_connect (&(connstrings[i]));
cut_assert_not_null (device, cut_message ("nfc_connect"));
res = nfc_initiator_init(device);
cut_assert_true (res, cut_message ("nfc_initiator_init"));
const nfc_modulation_t nm = {
const nfc_modulation nm = {
.nmt = NMT_ISO14443A,
.nbr = NBR_106,
};