From 741d3f95b3d4005c83d9f56fb48ac56db4b86b72 Mon Sep 17 00:00:00 2001 From: ms3939 <114799185+ManogjnaSinguluri@users.noreply.github.com> Date: Tue, 15 Nov 2022 00:40:23 +0530 Subject: [PATCH] chore: fix `tic_tac_toe.c` CodeQL warning (#1133) e<=8 is not needed as remainder is always less than remainder so e<9(e>=8) is obvious in every case --- games/tic_tac_toe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/tic_tac_toe.c b/games/tic_tac_toe.c index 07b7bd68..fbaf0e22 100644 --- a/games/tic_tac_toe.c +++ b/games/tic_tac_toe.c @@ -283,7 +283,7 @@ void place() int e = rand() % 9; - if (e >= 0 && e <= 8) + if (e >= 0) { if (game_table[e] != 'x' && game_table[e] != 'o') {