commit | c439e7b099c25a87ca41abc13cd3df875c8ddf9d | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Tue Mar 03 13:12:00 2015 +0000 |
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Tue Mar 03 13:12:00 2015 +0000 |
tree | b47773ee54f710857439771271fb1ede66f8594a | |
parent | 02ba5785bff3a3723b1db60f68e21296dd36862b [diff] |
Minor portability fix in benchmark On embedded systems, argc might be 0 rather than 1 for no argument.
diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c index 912aa7d..5dff3e9 100644 --- a/programs/test/benchmark.c +++ b/programs/test/benchmark.c
@@ -255,8 +255,10 @@ unsigned char malloc_buf[HEAP_SIZE] = { 0 }; #endif - if( argc == 1 ) + if( argc <= 1 ) + { memset( &todo, 1, sizeof( todo ) ); + } else { memset( &todo, 0, sizeof( todo ) );