From 49ffd1e026de8e5175dbe52a24584fb00d9340aa Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 16 Aug 2014 20:17:49 +0200 Subject: [PATCH] Server: Minor code-stylistic corrections. --- src/server/ai.c | 2 +- src/server/io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/ai.c b/src/server/ai.c index d05f584..b6c8cbc 100644 --- a/src/server/ai.c +++ b/src/server/ai.c @@ -189,7 +189,7 @@ static uint8_t get_dir_to_nearest_thing(struct Thing * t_eye, char filter) if (seeing_thing(t_eye, filter)) { uint32_t map_size = world.map.length * world.map.length; - uint16_t * score_map = try_malloc(map_size * sizeof(uint16_t), __func__); + uint16_t * score_map = try_malloc(map_size * sizeof(uint16_t),__func__); init_score_map(filter, score_map, map_size, t_eye); dijkstra_map(score_map, UINT16_MAX-1); uint16_t neighbors[N_DIRS]; diff --git a/src/server/io.c b/src/server/io.c index 14b5e48..0f65cea 100644 --- a/src/server/io.c +++ b/src/server/io.c @@ -322,7 +322,7 @@ static char * build_visible_map(struct Thing * player) { for (t = world.things; t != 0; t = t->next) { - if ('v'==player->fov_map[t->pos.y*world.map.length+t->pos.x]) + if ('v' == player->fov_map[t->pos.y*world.map.length+t->pos.x]) { struct ThingType * tt = get_thing_type(t->type); if ( (0 == i && !t->lifepoints && !tt->consumable) @@ -358,7 +358,7 @@ static void write_map(struct Thing * player, FILE * file) { for (x = 0; x < world.map.length; x++) { - try_fputc(player->mem_map[y * world.map.length + x], file, __func__); + try_fputc(player->mem_map[y*world.map.length+x], file, __func__); } try_fputc('\n', file, __func__); } -- 2.30.2