Rename dbl list labels
This commit is contained in:
@@ -139,14 +139,14 @@ GenericNode *_dbl_list_pop_front(GenericList *list, u64 item_size) {
|
||||
GenericNode *output = NULL;
|
||||
|
||||
if (list->node_count == 0) {
|
||||
goto RETURN_I32_LIST_POP_FRONT;
|
||||
goto RETURN_LIST_POP_FRONT;
|
||||
}
|
||||
|
||||
output = list->first;
|
||||
|
||||
if (list->node_count == 1) {
|
||||
*list = (GenericList){.magic = WAPP_DBL_LIST_MAGIC, .item_size = item_size};
|
||||
goto RETURN_I32_LIST_POP_FRONT;
|
||||
goto RETURN_LIST_POP_FRONT;
|
||||
}
|
||||
|
||||
--(list->node_count);
|
||||
@@ -154,7 +154,7 @@ GenericNode *_dbl_list_pop_front(GenericList *list, u64 item_size) {
|
||||
|
||||
output->prev = output->next = NULL;
|
||||
|
||||
RETURN_I32_LIST_POP_FRONT:
|
||||
RETURN_LIST_POP_FRONT:
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -165,14 +165,14 @@ GenericNode *_dbl_list_pop_back(GenericList *list, u64 item_size) {
|
||||
GenericNode *output = NULL;
|
||||
|
||||
if (list->node_count == 0) {
|
||||
goto RETURN_I32_LIST_POP_BACK;
|
||||
goto RETURN_LIST_POP_BACK;
|
||||
}
|
||||
|
||||
output = list->last;
|
||||
|
||||
if (list->node_count == 1) {
|
||||
*list = (GenericList){.magic = WAPP_DBL_LIST_MAGIC, .item_size = item_size};
|
||||
goto RETURN_I32_LIST_POP_BACK;
|
||||
goto RETURN_LIST_POP_BACK;
|
||||
}
|
||||
|
||||
--(list->node_count);
|
||||
@@ -180,7 +180,7 @@ GenericNode *_dbl_list_pop_back(GenericList *list, u64 item_size) {
|
||||
|
||||
output->prev = output->next = NULL;
|
||||
|
||||
RETURN_I32_LIST_POP_BACK:
|
||||
RETURN_LIST_POP_BACK:
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -192,15 +192,15 @@ GenericNode *_dbl_list_remove(GenericList *list, u64 index, u64 item_size) {
|
||||
|
||||
if (index == 0) {
|
||||
output = _dbl_list_pop_front(list, item_size);
|
||||
goto RETURN_I32_LIST_REMOVE;
|
||||
goto RETURN_LIST_REMOVE;
|
||||
} else if (index == list->node_count) {
|
||||
output = _dbl_list_pop_back(list, item_size);
|
||||
goto RETURN_I32_LIST_REMOVE;
|
||||
goto RETURN_LIST_REMOVE;
|
||||
}
|
||||
|
||||
output = _dbl_list_get(list, index, item_size);
|
||||
if (!output) {
|
||||
goto RETURN_I32_LIST_REMOVE;
|
||||
goto RETURN_LIST_REMOVE;
|
||||
}
|
||||
|
||||
output->prev->next = output->next;
|
||||
@@ -210,7 +210,7 @@ GenericNode *_dbl_list_remove(GenericList *list, u64 index, u64 item_size) {
|
||||
|
||||
output->prev = output->next = NULL;
|
||||
|
||||
RETURN_I32_LIST_REMOVE:
|
||||
RETURN_LIST_REMOVE:
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user