diff options
-rw-r--r-- | utils/benchmark.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/benchmark.c b/utils/benchmark.c index a3fc5f1..6b01fb7 100644 --- a/utils/benchmark.c +++ b/utils/benchmark.c @@ -39,7 +39,6 @@ int gen_randsaltstr(eurephiaCTX *ctx, char *saltstr, int len); // A function which calculates a hash based on a standard password, used // for measuring the time used for hash calculation void benchmark_hashing(int rounds) { - char *buffer = NULL; char *pwdhash = NULL; static char randstr[34]; @@ -122,6 +121,9 @@ int benchmark(int *min, int *max, int thr_min, int thr_max) { printf("Benchmarking "); *min = 1000; *max = 5000; + memset(&min_time, 0, sizeof(struct timeval)); + memset(&max_time, 0, sizeof(struct timeval)); + for( i = 1000; i < 100000000; i += 1000 ) { printf("."); fflush(stdout); |