summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-09-15 21:48:30 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-09-15 21:48:30 +0200
commitc3d1420a28534ca225517efa07d7ba60b963f026 (patch)
tree1cbf2a4e5402b292ab87a0f368460705c6db8f4a /utils
parent65c25eab6b3d4abfd3ead03a0f717223092e80ed (diff)
downloadeurephia-c3d1420a28534ca225517efa07d7ba60b963f026.tar.gz
eurephia-c3d1420a28534ca225517efa07d7ba60b963f026.tar.xz
eurephia-c3d1420a28534ca225517efa07d7ba60b963f026.zip
Fix some valgrind warnings. Two timeval structs where not initialised before being used
Diffstat (limited to 'utils')
-rw-r--r--utils/benchmark.c4
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);