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

Bug in unix/sys_arch.c #1

Open
peskybp opened this issue Mar 5, 2013 · 3 comments
Open

Bug in unix/sys_arch.c #1

peskybp opened this issue Mar 5, 2013 · 3 comments

Comments

@peskybp
Copy link

peskybp commented Mar 5, 2013

The sys_now() function improperly uses a u32_t type for the usec variable. This causes large time differences of 4x10^6 to occur when the tv.tv_usec value is less than the starttime.tv_usec value.

If the type of just the usec variable and the cast are changed to s32_t, everything is fine.

@goertzenator
Copy link
Owner

Can you clarify which file you are referring to? There is no unix/sys_arch.c, and nxpcommon/arch/sys_arch.c doesn't have a usec variable.

@peskybp
Copy link
Author

peskybp commented Mar 5, 2013

Sorry about that, here's the full path:

contrib-1.4.0/ports/unix/sys_arch.c

@goertzenator
Copy link
Owner

Oooo, nice catch! Unfortunately I just made this github snapshot for my own easy reference and don't intend to maintain it. I'm sure the upstream project would like to know about this. I don't know offhand exactly where to report it, but http://savannah.nongnu.org/projects/lwip would be a good place to start looking.

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

2 participants