From c439e7b099c25a87ca41abc13cd3df875c8ddf9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 3 Mar 2015 13:12:00 +0000 Subject: [PATCH] Minor portability fix in benchmark On embedded systems, argc might be 0 rather than 1 for no argument. --- programs/test/benchmark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c index 912aa7df0..5dff3e98c 100644 --- a/programs/test/benchmark.c +++ b/programs/test/benchmark.c @@ -255,8 +255,10 @@ int main( int argc, char *argv[] ) 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 ) );