Repository navigation
resolve: several cleanups of handing /etc/hosts - #9760
Merged
Merged
Conversation
poettering
reviewed
Jul 31, 2018
| siphash24_compress(&a->address.in, sizeof(a->address.in), state); | ||
| else if (a->family == AF_INET6) | ||
| siphash24_compress(&a->address.in6, sizeof(a->address.in6), state); | ||
| } |
Member
There was a problem hiding this comment.
maybe add
else
assert_not_reached("unexpected socket protocol");or so...
poettering
reviewed
Jul 31, 2018
| const struct in_addr_data *x = a, *y = b; | ||
|
|
||
| if (x->family != y->family) | ||
| return x->family - y->family; |
Member
There was a problem hiding this comment.
let's hope that sa_family_t is signed, because otherwise this is pretty ugly...
I usually prefer doing explicit comparisons here and returning -1, 0, 1...
Merged
filbranden
added a commit
to filbranden/systemd
that referenced
this pull request
Aug 7, 2018
Follow up for PRs systemd#9764 and systemd#9760.
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.
This slightly improve the performance of reading /etc/hosts about ~1%. Of course, it is not enough for #9718.