change max return + parms form int to unsigned int

This commit is contained in:
Théophyl Hoguet committed 2022-03-06 00:23:52 +01:00
1 parent b8d1a881cb
commit 54aea82417
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
int max(int a, int b) { unsigned int max(unsigned int a, unsigned int b) {
if (a > b) if (a > b)
return a; return a;
return b; return b;
+3 -3
View File
@@ -15,11 +15,11 @@ struct game_s {
/** /**
* @brief return the max between a and b * @brief return the max between a and b
* *
* @param a int to test * @param a uint to test
* @param b int to test * @param b uint to test
* @return the max between a and b * @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 * @brief check if the pointer is NULL fprinf and exit else nothing