From 2c11694a46d846418792408b130cd40658cb04fa Mon Sep 17 00:00:00 2001 From: rasky Date: Wed, 29 Sep 2010 13:31:22 +0000 Subject: [PATCH] SEC: fix a useless call in benchmarks. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4345 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/sec/benchmarks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.25.1