Make negative function_id value impossible in test suites
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
diff --git a/tests/suites/host_test.function b/tests/suites/host_test.function
index 5951e46..5688efd 100644
--- a/tests/suites/host_test.function
+++ b/tests/suites/host_test.function
@@ -387,7 +387,7 @@
const char **test_files = NULL;
size_t testfile_count = 0;
int option_verbose = 0;
- int function_id = 0;
+ size_t function_id = 0;
/* Other Local variables */
int arg_index = 1;
@@ -563,7 +563,7 @@
}
#endif /* __unix__ || __APPLE__ __MACH__ */
- function_id = strtol( params[0], NULL, 10 );
+ function_id = strtoul( params[0], NULL, 10 );
if ( (ret = check_test( function_id )) == DISPATCH_TEST_SUCCESS )
{
ret = convert_params( cnt - 1, params + 1, int_params );