huawei-ups2000: fightwarn hypercorrectionism cleanup#1465
Merged
jimklimov merged 5 commits intonetworkupstools:masterfrom Jul 13, 2022
Merged
huawei-ups2000: fightwarn hypercorrectionism cleanup#1465jimklimov merged 5 commits intonetworkupstools:masterfrom
jimklimov merged 5 commits intonetworkupstools:masterfrom
Conversation
737362a to
62f226c
Compare
Contributor
Author
|
CI/CD has failed, but it's actually caused by an unrelated spellcheck regression in the current branch, and it has nothing to do with the actual code. Please merge the fix in #1466 then we can restart the CI/CD again. |
…bit-shifting The initial code didn't cast to uint16_t and was certainly a bug, but to fix that, only a single cast is needed, not three casts. Signed-off-by: Yifeng Li <tomli@tomli.me>
… casts in crc16 calculations The initial code didn't cast to uint16_t and was certainly a bug, but to fix that, only a single cast is needed, not three casts. Signed-off-by: Yifeng Li <tomli@tomli.me>
This removes the unnecessary casts in between. Also, size_t is semantically more correct than uint16_t. Signed-off-by: Yifeng Li <tomli@tomli.me>
After crc16() has been modified to accept a size_t length, it's unnecessary to check whether the input length is greater than UINT16_MAX. Also, the check on whether ident_response_len is at least as long as the IDENT_RESPONSE_CRC_LEN is useless, since this condition is already implied by the previous check in step 2, it's thus removed. Signed-off-by: Yifeng Li <tomli@tomli.me>
…e-check. Signed-off-by: Yifeng Li <tomli@tomli.me>
58c99d6 to
9d1feea
Compare
Member
|
CI faults in last iteration were due to CI build farm slowness it seems (some daemons did not start/connect within timeout); a previous iteration (merge from master, not rebased as done later) succeeded fully. Merging, thanks :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Fightwarm fix #1216, several bugs have been fixed, but it also introduced some changes that I perceive as unnecessary hypercorrectionism. For example, it used three type casts when it's only necessary to use just one type cast (as far as I can see, it's the case, but the CI/CD should let us know if the compiler disagrees). This is a minor cleanup Pull Request to remove these changes.