halayli/lthread

lthread_create not initializing new_next and sleep_next correctly?

Closed this issue · 1 comments

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;

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