mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-22 04:01:53 +03:00
Minor portability fix in benchmark
On embedded systems, argc might be 0 rather than 1 for no argument.
This commit is contained in:
@ -255,8 +255,10 @@ int main( int argc, char *argv[] )
|
|||||||
unsigned char malloc_buf[HEAP_SIZE] = { 0 };
|
unsigned char malloc_buf[HEAP_SIZE] = { 0 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( argc == 1 )
|
if( argc <= 1 )
|
||||||
|
{
|
||||||
memset( &todo, 1, sizeof( todo ) );
|
memset( &todo, 1, sizeof( todo ) );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memset( &todo, 0, sizeof( todo ) );
|
memset( &todo, 0, sizeof( todo ) );
|
||||||
|
Reference in New Issue
Block a user