Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use slot variable in ccid_usb.c #86

Closed

Conversation

emaxx-google
Copy link
Contributor

Use the slot variable instead of calculating the number every time.

This also fixes the warning from clang:

ccid_usb.c:1521:11: warning: variable 'slot' set but not used [-Wunused-but-set-variable]

Use the slot variable instead of calculating the number every time.

This also fixes the warning from clang:

ccid_usb.c:1521:11: warning: variable 'slot' set but not used [-Wunused-but-set-variable]
@@ -1550,7 +1550,7 @@ static void *Multi_PollingProc(void *p_ext)
change = (slot_status & 2) ? "status changed" : "no change";

DEBUG_COMM3("slot %d status: %d",
s + b*4, slot_status);
s + slot, slot_status);
Copy link
Contributor Author

@emaxx-google emaxx-google Jul 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, is the calculation (s + b*4) correct here? It's a bit confusing that the variable called "slot" was calculated as just b*4.

@LudovicRousseau
Copy link
Owner

Fixed in 45fdfde

Yes, the computation is correct. Each byte contains 2 bits of information for 4 slots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants