minor code improvement
authorHolger Schemel <info@artsoft.org>
Tue, 2 Feb 2021 11:35:53 +0000 (12:35 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 2 Feb 2021 11:35:53 +0000 (12:35 +0100)
src/libgame/setup.c

index b24ac1035afb1de56ddf7830f52e6c0696be5e88..2372886f92d3b02af60f605f6dc93a7c6c4b46b7 100644 (file)
@@ -2900,12 +2900,11 @@ static TreeInfo *createParentTreeInfoNode(TreeInfo *node_parent)
 
 static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first)
 {
-  TreeInfo *ti_new, *ti_new2;
-
   if (node_first == NULL)
     return NULL;
 
-  ti_new = newTreeInfo();
+  TreeInfo *ti_new = newTreeInfo();
+
   setTreeInfoToDefaults(ti_new, TREE_TYPE_LEVEL_DIR);
 
   ti_new->node_parent = NULL;
@@ -2926,7 +2925,7 @@ static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first)
   ti_new->node_group = node_first;
   ti_new->level_group = TRUE;
 
-  ti_new2 = createParentTreeInfoNode(ti_new);
+  TreeInfo *ti_new2 = createParentTreeInfoNode(ti_new);
 
   setString(&ti_new2->name, ".. (main menu)");
   setString(&ti_new2->name_sorting, ti_new2->name);