mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-03 22:31:50 +00:00
Fix cppcheck warning: The scope of the variable X can be reduced.
This commit is contained in:
@@ -151,7 +151,6 @@ initiator_thread(void *arg)
|
||||
void
|
||||
test_dep_active(void)
|
||||
{
|
||||
int res;
|
||||
nfc_baud_rate nbrs[3] = { NBR_106, NBR_212, NBR_424};
|
||||
|
||||
CutTestContext *test_context = cut_get_current_test_context();
|
||||
@@ -167,6 +166,7 @@ test_dep_active(void)
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
initiator_data.nbr = nbrs[i];
|
||||
int res;
|
||||
|
||||
if ((res = pthread_create(&(threads[TARGET]), NULL, target_thread, &target_data)))
|
||||
cut_fail("pthread_create() returned %d", res);
|
||||
|
||||
@@ -177,8 +177,6 @@ initiator_thread(void *arg)
|
||||
void
|
||||
test_dep_states(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
CutTestContext *test_context = cut_get_current_test_context();
|
||||
struct thread_data target_data = {
|
||||
.device = first_device,
|
||||
@@ -191,6 +189,7 @@ test_dep_states(void)
|
||||
};
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
int res;
|
||||
if ((res = pthread_create(&(threads[1]), NULL, target_thread, &target_data)))
|
||||
cut_fail("pthread_create() returned %d", res);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user