From 11b8179a57e675c6672cbe649c655230ae3e9744 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 19 Jun 2017 14:38:41 -0500 Subject: Import Upstream version 0.4.2.1 --- arch/common/blowfish.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'arch/common/blowfish.h') diff --git a/arch/common/blowfish.h b/arch/common/blowfish.h index ad4bdb92..ceec7a96 100644 --- a/arch/common/blowfish.h +++ b/arch/common/blowfish.h @@ -1,6 +1,6 @@ /* * HardInfo - Displays System Information - * Copyright (C) 2003-2006 Leandro A. F. Pereira + * Copyright (C) 2003-2007 Leandro A. F. Pereira * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ #include -gchar * +static void benchmark_fish(void) { BLOWFISH_CTX ctx; @@ -36,17 +36,14 @@ benchmark_fish(void) gchar *bdata_path; - bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data", - gbr_find_data_dir(PREFIX)); - + bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL); if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) { g_free(bdata_path); - return g_strdup("[Error]\n" - PREFIX "benchmark.data not found=\n"); + return; } shell_view_set_enabled(FALSE); - shell_status_update("Benchmarking..."); + shell_status_update("Performing Blowfish benchmark..."); for (i = 0; i <= 50000; i++) { g_timer_start(timer); @@ -63,8 +60,6 @@ benchmark_fish(void) g_timer_destroy(timer); g_free(bdata_path); - - gchar *retval = g_strdup_printf("[Results (in seconds; lower is better)]\n" - "This Machine=%.2f\n", elapsed); - return benchmark_include_results(retval, "Blowfish"); + + bench_results[BENCHMARK_BLOWFISH] = elapsed; } -- cgit v1.2.3