Remove redundant count division in genericHgetallCommand#3573
Merged
ranshid merged 1 commit intoApr 28, 2026
Merged
Conversation
Signed-off-by: djk1027 <djk9510271@gmail.com>
e00b8ea to
81c9d49
Compare
enjoy-binbin
approved these changes
Apr 28, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3573 +/- ##
============================================
- Coverage 76.66% 76.46% -0.21%
============================================
Files 159 159
Lines 80114 80113 -1
============================================
- Hits 61423 61257 -166
- Misses 18691 18856 +165
🚀 New features to boost your workflow:
|
abmathur-ie
pushed a commit
to abmathur-ie/valkey
that referenced
this pull request
Apr 29, 2026
) The argument `count /= 2` modifies `count` as a side effect, and the following `count /= 2` divides it again unnecessarily. Since `count` is not used after this point, fix it by using `count / 2` without the side effect and remove the redundant second assignment. Signed-off-by: djk1027 <djk9510271@gmail.com> Signed-off-by: Abhishek Mathur <matshek@amazon.com>
This was referenced May 3, 2026
lucasyonge
pushed a commit
that referenced
this pull request
May 11, 2026
The argument `count /= 2` modifies `count` as a side effect, and the following `count /= 2` divides it again unnecessarily. Since `count` is not used after this point, fix it by using `count / 2` without the side effect and remove the redundant second assignment. Signed-off-by: djk1027 <djk9510271@gmail.com>
lucasyonge
pushed a commit
that referenced
this pull request
May 12, 2026
The argument `count /= 2` modifies `count` as a side effect, and the following `count /= 2` divides it again unnecessarily. Since `count` is not used after this point, fix it by using `count / 2` without the side effect and remove the redundant second assignment. Signed-off-by: djk1027 <djk9510271@gmail.com>
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.
The argument
count /= 2modifiescountas a side effect, and the followingcount /= 2divides it again unnecessarily.Since
countis not used after this point, fix it by usingcount / 2without the side effect and remove the redundant second assignment.