From: Christian Heller Date: Wed, 21 Aug 2013 17:23:34 +0000 (+0200) Subject: Small refactoring for greater readability. X-Git-Tag: tce~1080 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/te"st.html?a=commitdiff_plain;h=b37024737a3660b7eeec66738db87ccba6c1ecdb;p=plomrogue Small refactoring for greater readability. --- diff --git a/src/misc.c b/src/misc.c index 711e049..ab9963f 100644 --- a/src/misc.c +++ b/src/misc.c @@ -135,8 +135,6 @@ extern void turn_over(struct World * world, char action) extern void save_game(struct World * world) { - char * savefile_tmp = "savefile_tmp"; - char * savefile = "savefile"; char * err_open = "Error saving game: " "Unable to open 'savefile_new' for writing."; char * err_write = "Error saving game: " @@ -147,6 +145,8 @@ extern void save_game(struct World * world) "Unable to unlink old 'savefile'."; char * err_move = "Error saving game: " "Unable to rename 'savefile_tmp' to 'savefile'."; + char * savefile_tmp = "savefile_tmp"; + char * savefile = "savefile"; FILE * file = fopen(savefile_tmp, "w"); exit_err(0 == file, world, err_open); if ( write_uint32_bigendian(world->seed, file)