-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor case-statement to if-statement to avoid implicit fallback. (#…
…310)
- Loading branch information
1 parent
4235b0e
commit fa68771
Showing
1 changed file
with
43 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fa68771
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.
If I apply this commit, my WiFi connection will never complete.
Reverting to the previous commit, everything works perfectly.
If you need any extra information, do not hesitate to ask me.
Thx
fa68771
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.
@juan-zaratiegui-aai, didn't try it myself yet but wouldn't be surprised given that old code wasn't overriding
ptable->func
forWIFI_ASSOCREQ
andWIFI_REASSOCREQ
, only forWIFI_AUTH
. Looking at function names used (OnAuth
andOnAuthClient
), it's reasonable to guess that they're meant forWIFI_AUTH
alone.Not sure what exactly was wrong with the fallthrough in the first place. If compiler is bothered with it being implicit but humans aren't, there's a way to make it explicit (see documentation). @bnpfeife, @harshavardhana, would you care to comment?
fa68771
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.
@mikedld
I agree with your assessment. I mucked up the logic during the conversion. So, I've created a PR #324 that reverts the original commit and uses the explicit fallthrough attribute.