Initialise variables, where appropriate

This commit is contained in:
Ian Barwick
2017-08-14 15:11:42 +09:00
parent 4260fdf1e7
commit 3b2158edbf
13 changed files with 383 additions and 345 deletions

View File

@@ -127,6 +127,24 @@ item_list_append_format(ItemList *item_list, const char *format, ...)
}
void
item_list_free(ItemList *item_list)
{
ItemListCell *cell;
ItemListCell *next_cell;
cell = item_list->head;
while (cell != NULL)
{
next_cell = cell->next;
pfree(cell->string);
pfree(cell);
cell = next_cell;
}
}
void
key_value_list_set(KeyValueList *item_list, const char *key, const char *value)
{
@@ -208,7 +226,6 @@ key_value_list_free(KeyValueList *item_list)
pfree(cell);
cell = next_cell;
}
}