mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Incorporated code revoew comments.
This commit is contained in:
parent
b31aa44e16
commit
8d686bfdb1
3 changed files with 112 additions and 50 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#line 2 "suites/host_test.function"
|
||||
|
||||
/**
|
||||
* \brief Varifies that string is in string parameter format i.e. "<str>"
|
||||
* \brief Verifies that string is in string parameter format i.e. "<str>"
|
||||
* It also strips enclosing '"' from the input string.
|
||||
*
|
||||
* \param str String parameter.
|
||||
|
|
@ -18,14 +18,14 @@ int verify_string( char **str )
|
|||
return( -1 );
|
||||
}
|
||||
|
||||
(*str)++;
|
||||
(*str)[strlen( *str ) - 1] = '\0';
|
||||
( *str )++;
|
||||
( *str )[strlen( *str ) - 1] = '\0';
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Varifies that string is an integer. Also gives the converted
|
||||
* \brief Verifies that string is an integer. Also gives the converted
|
||||
* integer value.
|
||||
*
|
||||
* \param str Input string.
|
||||
|
|
@ -243,7 +243,7 @@ static int convert_params( size_t cnt , char ** params , int * int_params_store
|
|||
char ** out = params;
|
||||
int ret = ( DISPATCH_TEST_SUCCESS );
|
||||
|
||||
while ( cur - params < (int) cnt )
|
||||
while ( cur < params + cnt )
|
||||
{
|
||||
char * type = *cur++;
|
||||
char * val = *cur++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue