From 6b933d1d3e42e6e7a2e06169d305aae772dd5d03 Mon Sep 17 00:00:00 2001 From: x Date: Sun, 7 Jan 2018 18:36:14 +0100 Subject: [PATCH] IcBench: Sample Benchmark App --- icapp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icapp.c b/icapp.c index c450eb5..2875c8a 100644 --- a/icapp.c +++ b/icapp.c @@ -21,7 +21,7 @@ - homepage : https://sites.google.com/site/powturbo/ - twitter : https://twitter.com/powturbo - TurboRLE - "Most efficient and fastest Run Length Encoding" + TurboPFor - "Benchmark demo application" **/ #include #include @@ -112,10 +112,10 @@ int main(int argc, char* argv[]) { if(flen > b) flen = b; n = flen; - if(!(in = (unsigned char*)malloc(n+1024))) { fprintf(stderr, "malloc error\n"); exit(-1); } cpy = in; + if(!(in = (unsigned char*)malloc(n+1024))) { fprintf(stderr, "malloc error\n"); exit(-1); } cpy = in; if(!(out = (unsigned char*)malloc(flen*4/3+1024))) { fprintf(stderr, "malloc error\n"); exit(-1); } - if(cmp && !(cpy = (unsigned char*)malloc(n+1024))) { fprintf(stderr, "malloc error\n"); exit(-1); } - n = fread(in, 1, n, fi); printf("File='%s' Length=%u\n", inname, n); + if(cmp && !(cpy = (unsigned char*)malloc(n+1024))) { fprintf(stderr, "malloc error\n"); exit(-1); } + n = fread(in, 1, n, fi); printf("File='%s' Length=%u\n", inname, n); fclose(fi); if(n <= 0) exit(0); if(fno == optind)