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/sha1.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'arch/common/sha1.h') diff --git a/arch/common/sha1.h b/arch/common/sha1.h index 4bd07276..3b7f7652 100644 --- a/arch/common/sha1.h +++ b/arch/common/sha1.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 @@ -17,7 +17,7 @@ */ #include -gchar * +static void benchmark_sha1(void) { SHA1_CTX ctx; @@ -32,13 +32,10 @@ benchmark_sha1(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); @@ -59,9 +56,7 @@ benchmark_sha1(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, "SHA1"); + + bench_results[BENCHMARK_SHA1] = 312.0 / elapsed; } -- cgit v1.2.3