From 54aea824175edef475a7958f6e029086c6fcf129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophyl=20Hoguet?= Date: Sun, 6 Mar 2022 00:23:52 +0100 Subject: [PATCH] change max return + parms form int to unsigned int --- game_private.c | 2 +- game_private.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/game_private.c b/game_private.c index 0791765..ee69e46 100644 --- a/game_private.c +++ b/game_private.c @@ -1,7 +1,7 @@ #include #include -int max(int a, int b) { +unsigned int max(unsigned int a, unsigned int b) { if (a > b) return a; return b; diff --git a/game_private.h b/game_private.h index 2653cbc..ec6f3b3 100644 --- a/game_private.h +++ b/game_private.h @@ -15,11 +15,11 @@ struct game_s { /** * @brief return the max between a and b * - * @param a int to test - * @param b int to test + * @param a uint to test + * @param b uint to test * @return the max between a and b */ -int max(int a, int b); +unsigned int max(unsigned int a, unsigned int b); /** * @brief check if the pointer is NULL fprinf and exit else nothing