From: rasky Date: Wed, 29 Sep 2010 13:31:22 +0000 (+0000) Subject: SEC: fix a useless call in benchmarks. X-Git-Tag: 2.6.0~56 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=2c11694a46d846418792408b130cd40658cb04fa;p=bertos.git SEC: fix a useless call in benchmarks. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4345 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/sec/benchmarks.c b/bertos/sec/benchmarks.c index afe72751..727697d3 100644 --- a/bertos/sec/benchmarks.c +++ b/bertos/sec/benchmarks.c @@ -35,7 +35,8 @@ void prng_benchmark(PRNG *prng, const char *hname, int numbytes) for (int j=0;j<2048;++j) { for (int i=0; i<(numbytes+511)/512-1; ++i) prng_generate(prng, buf, 512); - prng_generate(prng, buf, numbytes%512); + if (numbytes % 512) + prng_generate(prng, buf, numbytes%512); } t = timer_clock() - t;