-
-
Notifications
You must be signed in to change notification settings - Fork 110
Fixes #103: Misleadingly 'else' clause #104
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good at first glance. Two remarks:
- I think fixing the indentation might also be sufficient fix, from a quick look the coding style of this file seems to be to omit braces for single-statement ifs, so maybe adding them there here is not ideal.
- Did you check the code to see if this is actually the correct code? It could be that the else was intended to contain both statements (in which case there is a bug that might need to be fixed, instead of incorrect indentation).
The coding style is inconsistent anyways: compare the following examples.
I replaced now all the tabs with four spaces. The following snipped from line 668 to line 712 illustrates in the last
Due to that, I corrected the placement of the braces. |
Seems that replacing tabs by spaces is a good idea, that file has mixed tabs and spaces which is hardly ever a good idea.
Seems you looked further than I did, so fine to leave it like this.
I'm not so sure I follow this. Do you mean because there are also two However, that sends 1 or 2 bytes, depending on the value of So I did (I looked at the main USB spec, version 2.0, April 27, 2000). For The returned values for the case handled here, are indeed just a halt bit: So, your latest push seems incorrect, since it sometimes returns just one byte. For Maybe I'm misunderstanding what Finally, as for the structure of your commits, you have now mixed a functional change (moving Ideally, you would get two commits:
This requires some git history editing (e.g. with rebase) and a force push (please do not open a new PR for this). Let me know if you can't figure this out (git is not the most friendly out there), then I can also fix this for you. |
Ok. Thanks for your detailed review! I sorted my commits and corrected the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.