home · contact · privacy
Removed unnecessary NULLings of pointers, explained kept ones.
[plomrogue] / src / server / init.c
index f6b56a631dfa8199642ba674c2e9ced14c1b8738..97ed0fa09c0af955b835a2bd773436f4805255eb 100644 (file)
@@ -1,6 +1,7 @@
 /* src/server/init.c */
 
 #include "init.h"
+#include <stddef.h> /* NULL */
 #include <stdint.h> /* uint32_t */
 #include <stdlib.h> /* exit(), free() */
 #include <string.h> /* atoi() */
@@ -48,15 +49,12 @@ extern void obey_argv(int argc, char * argv[])
 extern void remake_world(uint32_t seed)
 {
     free(world.log);
-    world.log = NULL;
+    world.log = NULL;  /* map_object_action.c's update_log() checks for this. */
     world.seed = seed;
     world.map_obj_count = 0;
     world.score = 0;
     free(world.map.cells);
-    if (world.map_objs)
-    {
-        free_map_objects(world.map_objs);
-    }
+    free_map_objects(world.map_objs);
     world.last_update_turn = 0;
     world.turn = 1;
     init_map();