fix: list function should skip over empty pools
This commit is contained in:
@ -41,9 +41,14 @@ lm_pkg_t *lm_ctx_list_next(lm_ctx_list_t *list){
|
||||
return list->pkg;
|
||||
}
|
||||
|
||||
if((list->pkg = list->pkg->next) && NULL == list->pkg){
|
||||
if((list->pool = list->pool->next) != NULL)
|
||||
list->pkg = list->pool->pkg;
|
||||
if((list->pkg = list->pkg->next) == NULL){
|
||||
next_pool:
|
||||
if((list->pool = list->pool->next) == NULL)
|
||||
return list->pkg;
|
||||
|
||||
if((list->pkg = list->pool->pkg) == NULL)
|
||||
goto next_pool;
|
||||
|
||||
return list->pkg;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user