From 78fd6086f58ef93992b0c1e2958a273e7ae48248 Mon Sep 17 00:00:00 2001 From: Linus_Probert Date: Tue, 30 Jan 2018 14:00:52 +0100 Subject: [PATCH] Reduced the scope of a variable. --- src/item.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/item.c b/src/item.c index b3d0125..b5d8f34 100644 --- a/src/item.c +++ b/src/item.c @@ -42,14 +42,13 @@ void item_destroy(Item *item) { LinkedList *items; - Item *subitem; if (item->sprite) sprite_destroy(item->sprite); items = item->items; while (items != NULL) { - subitem = items->data; + Item *subitem = items->data; items->data = NULL; items = items->next; item_destroy(subitem);