From e23ea3a560a432304851b6bcd7781f18181873e6 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 10 Mar 2014 14:49:41 +0100
Subject: [PATCH] Added -Wextra to compiler flags, found out about redundant
 test.

---
 Makefile         | 2 +-
 src/server/map.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index c7831bd..3280dd3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-Wall -g
+CFLAGS=-Wall -Wextra -g
 TARGET_SERVER=roguelike-server
 TARGET_CLIENT=roguelike-client
 SRCDIR=src
diff --git a/src/server/map.c b/src/server/map.c
index 8bae81a..0edd955 100644
--- a/src/server/map.c
+++ b/src/server/map.c
@@ -55,8 +55,7 @@ extern void init_map()
 extern uint8_t is_passable(struct yx_uint8 pos)
 {
     uint8_t passable = 0;
-    if (   0 <= pos.x && pos.x < world.map.size.x
-        && 0 <= pos.y && pos.y < world.map.size.y)
+    if (pos.x < world.map.size.x && pos.y < world.map.size.y)
     {
         passable = ('.' == world.map.cells[(pos.y * world.map.size.x) + pos.x]);
     }
-- 
2.30.2