Skip to content
Snippets Groups Projects
Commit 4bdb1e52 authored by Toby Murray's avatar Toby Murray
Browse files

remove some unneeded code to get the coverage stats up higher

parent e7f804a5
No related branches found
No related tags found
No related merge requests found
......@@ -246,10 +246,10 @@ nodeptr_list_t list_push(nodeptr_list_t lst, const node_t *p){
return lst;
}
/* when out is non-NULL we place a pointer to the first node into it */
/* when out is non-NULL we place a pointer to the first node into it.
assumption: lst.head and lst.last are non-NULL */
nodeptr_list_t list_pop(nodeptr_list_t lst, const node_t **out){
if (lst.head != NULL){
assert(lst.last != NULL);
assert(lst.head != NULL && lst.last != NULL);
if (out != NULL){
*out = lst.head->p;
}
......@@ -263,18 +263,12 @@ nodeptr_list_t list_pop(nodeptr_list_t lst, const node_t **out){
lst.head = ret;
}
return lst;
}else{
assert(lst.last == NULL);
if (out != NULL){
*out = (const node_t *)NULL;
}
return lst;
}
}
/* when out is non-NULL we place a pointer to the last node into it.
assumption: lst.head and lst.last are non-NULL */
nodeptr_list_t list_dequeue(nodeptr_list_t lst, const node_t **out){
if (lst.last != NULL){
assert(lst.head != NULL);
assert(lst.head != NULL && lst.last != NULL);
if (out != NULL){
*out = lst.last->p;
}
......@@ -289,13 +283,6 @@ nodeptr_list_t list_dequeue(nodeptr_list_t lst, const node_t **out){
lst.last = ret;
}
return lst;
}else{
assert(lst.head == NULL);
if (out != NULL){
*out = (const node_t *)NULL;
}
return lst;
}
}
#ifdef UNUSED_FUNCTIONS
......@@ -534,8 +521,6 @@ static int run(FILE *f){
}
}
}
assert(0 && "Should never reach here");
return 0;
}
#ifdef PASSBOOK_LIBFUZZER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment