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

lthread_create not initializing new_next and sleep_next correctly? #7

Closed
zoolib opened this issue Mar 4, 2012 · 1 comment
Closed

Comments

@zoolib
Copy link

zoolib commented Mar 4, 2012

new_next and sleep_next are initialized as follows:
lt->new_next.le_next = NULL;
lt->new_next.le_next = NULL;
lt->sleep_next.le_prev = NULL;
lt->sleep_next.le_prev = NULL;

should it not be as follows?
lt->new_next.le_next = NULL;
lt->new_next.le_prev = NULL;
lt->sleep_next.le_next = NULL;
lt->sleep_next.le_prev = NULL;

@halayli
Copy link
Owner

halayli commented Mar 4, 2012

The initializations are unnecessary (because of calloc) and needs to be cleaned. But the improper initialization is harmless in this case.

@halayli halayli closed this as completed in 28cc7da Mar 4, 2012
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