From 995c32c8f000524aaefad52bcea923ca39c3d64b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 6 May 2017 17:33:16 +0200 Subject: [PATCH] TP13 exo2: Remove FIXME comments that have been addressed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- TP_13/exo2/lib/display.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/TP_13/exo2/lib/display.c b/TP_13/exo2/lib/display.c index c60268a..f1cd180 100644 --- a/TP_13/exo2/lib/display.c +++ b/TP_13/exo2/lib/display.c @@ -71,9 +71,7 @@ static int remap_y(int y) { } else if (y > 1 && y <= 3) { return (remap_y(y - 1) + 3); } else { - /* FIXME: return an error value like -1 - * but for now there a bug somewhere */ - return 6; + return -1; } } @@ -84,16 +82,15 @@ static int remap_x(int x) { } else if (x > 1 && x <= 3) { return (remap_x(x - 1) + 5); } else { - /* FIXME: return an error value like -1 - * but for now there a bug somewhere */ - return 11; + return -1; } } void print_coordinates(coordinates_t coordinates_array[], int base_y, int base_x) { unsigned i = 0; - while ((coordinates_array + i)->y != 0 && (coordinates_array + i)->x != 0 && i < MAX_COORDINATES) { + while ((coordinates_array + i)->y != 0 && (coordinates_array + i)->x != 0 && \ + i < MAX_COORDINATES) { if ((coordinates_array + i)->type == 0) { print_o(base_y + remap_y((coordinates_array + i)->y), base_x + remap_x((coordinates_array + i)->x)); } else { -- 2.34.1