SEC: fix a useless call in benchmarks.
authorrasky <rasky@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 29 Sep 2010 13:31:22 +0000 (13:31 +0000)
committerrasky <rasky@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 29 Sep 2010 13:31:22 +0000 (13:31 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4345 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/sec/benchmarks.c

index afe727517b39280acbdcc16ff38e3f6cca1bfd51..727697d3fba1ec9bb6afc09f5abd93842ee1fddf 100644 (file)
@@ -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;