Fixing indentation

This commit is contained in:
Michael Tryby
2019-04-09 18:17:15 -04:00
parent 07995beda1
commit 39038bc17e

View File

@@ -33,13 +33,13 @@ list_t *create_list(int elementSize, freeFunction freeFn)
void delete_list(list_t *list)
{
listNode *current;
while(list->head != NULL) {
current = list->head;
list->head = current->next;
if (list->freeFn) {
if (list->freeFn)
list->freeFn(current->data);
}
free(current->data);
free(current);
@@ -100,7 +100,6 @@ void head_list(list_t *list, void **element, bool removeFromList)
assert(list->head != NULL);
listNode *node = list->head;
*element = (void *)malloc(list->elementSize);
memcpy(*element, node->data, list->elementSize);
@@ -108,9 +107,8 @@ void head_list(list_t *list, void **element, bool removeFromList)
list->head = node->next;
list->logicalLength--;
if (list->freeFn) {
if (list->freeFn)
list->freeFn(node->data);
}
free(node->data);
free(node);