Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use IP string length from ip_ntoa instead of strlen. #2861

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Feb 5, 2025

Saves us a strlen and is slightly safer. Also, changed the event length to not include the terminating NUL byte. Adding it is just confusing.


This change is Reviewable

@iphydf iphydf added this to the v0.2.21 milestone Feb 5, 2025
@github-actions github-actions bot added the refactor Refactoring production code, eg. renaming a variable, not affecting semantics label Feb 5, 2025
@iphydf iphydf marked this pull request as ready for review February 5, 2025 11:56
Copy link
Member

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are a couple of ci sed commands referencing dht_getnodes_api

Saves us a strlen and is slightly safer. Also, changed the event length
to not include the terminating NUL byte. Adding it is just confusing.
@iphydf iphydf requested a review from a team as a code owner February 5, 2025 16:58
@iphydf
Copy link
Member Author

iphydf commented Feb 5, 2025

there are a couple of ci sed commands referencing dht_getnodes_api

Done.

@toktok-releaser toktok-releaser merged commit b4a0e61 into TokTok:master Feb 5, 2025
75 checks passed
@iphydf iphydf deleted the ip-length branch February 5, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring production code, eg. renaming a variable, not affecting semantics
Development

Successfully merging this pull request may close these issues.

3 participants