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

replace caddr_t with standard type #86

Closed
wants to merge 1 commit into from
Closed

replace caddr_t with standard type #86

wants to merge 1 commit into from

Conversation

Redfoxymoon
Copy link

caddr_t is a legacy BSD type, there's no point in keeping it when char* is identical

@mikrosk
Copy link
Member

mikrosk commented Jan 14, 2020

What's wrong with casting it to struct in_addr* ?

@Redfoxymoon
Copy link
Author

Redfoxymoon commented Jan 14, 2020

I am not sure I understand? There's no functional difference, it's only a portability change.

mikrosk added a commit that referenced this pull request Jan 14, 2020
@mikrosk
Copy link
Member

mikrosk commented Jan 14, 2020

Oops, sorry, I have confused myself. What I meant why the casting at all? memcpy is perfectly happy with accepting any pointer (it's void* after all) so why not just remove the cast and caddr_t.

As it is faster to do than to talk about it, I just did it. :)

@mikrosk mikrosk closed this Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants