Skip to content
Snippets Groups Projects
Commit e1ac9bbe authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Removed duplicated list function (list_is_empty())

Refs #89
parent 60683e03
No related branches found
No related tags found
No related merge requests found
......@@ -178,19 +178,3 @@ size_t list_size(const list *l)
return count;
}
/**
* list_is_empty - Checks whether the list is empty
* @l: list
*
* This function returns 1 if list is empty, 0 otherwise.
*/
int list_is_empty(const list *l)
{
node *n = 0;
WALK_LIST(n, *l) {
return 0;
}
return 1;
}
......@@ -82,7 +82,6 @@ void init_list(list *);
void insert_node(node *, node *);
void list_dup(list *dst, list *src, size_t itemsz);
size_t list_size(const list *);
int list_is_empty(const list *l);
/*!
* \brief List item for string lists.
......
......@@ -260,8 +260,8 @@ int knot_changeset_is_empty(const knot_changeset_t *changeset)
return 0;
}
return list_is_empty(&changeset->add) &&
list_is_empty(&changeset->remove) == 0;
return EMPTY_LIST(changeset->add) &&
EMPTY_LIST(changeset->remove);
}
static void knot_free_changeset(knot_changeset_t *changeset)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment