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

ipconfig may not be word aligned #21

Open
larry-xmos opened this issue Oct 12, 2016 · 0 comments
Open

ipconfig may not be word aligned #21

larry-xmos opened this issue Oct 12, 2016 · 0 comments

Comments

@larry-xmos
Copy link

larry-xmos commented Oct 12, 2016

xC compiler doesn't word align local arrays on the stack at the moment. While this may or may not change in the future, uip_server_init is casting char[4] in ipconfig that's passed to int*, which is not very good code. Suggest using memcmp or a for loop.

if (ipconfig != NULL && (*((int*)ipconfig->ipaddr) != 0)) {

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

No branches or pull requests

1 participant