Fix minor inconsistency in connFormatAddr size argument#3098
Merged
Conversation
Signed-off-by: Vitah Lin <vitahlin@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3098 +/- ##
============================================
- Coverage 74.41% 74.35% -0.06%
============================================
Files 129 129
Lines 71013 71013
============================================
- Hits 52843 52804 -39
- Misses 18170 18209 +39
🚀 New features to boost your workflow:
|
dvkashapov
approved these changes
Jan 22, 2026
enjoy-binbin
approved these changes
Jan 23, 2026
harrylin98
pushed a commit
to harrylin98/valkey_forked
that referenced
this pull request
Feb 19, 2026
Minor fix to use the right var. Signed-off-by: Vitah Lin <vitahlin@gmail.com>
hpatro
pushed a commit
to hpatro/valkey
that referenced
this pull request
Mar 5, 2026
Minor fix to use the right var. Signed-off-by: Vitah Lin <vitahlin@gmail.com> Signed-off-by: Harkrishn Patro <bunty.hari@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.
Type: Refactoring / Code Cleanup
Description: While reviewing the connection layer logic, I noticed a minor inconsistency in how buffer sizes are passed to
connFormatAddr.In the error handling block of
acceptCommonHandler,sizeof(addr)is currently used for both the remote address and the local address buffers. While both addr and laddr are defined with the same size (NET_ADDR_STR_LEN), it is more idiomatic and safer to use the sizeof of the actual buffer being populated.This change ensures:
Code Comparison: