diff options
author | Agney Lopes Roth Ferraz <agney@debian.org> | 2007-04-09 11:45:31 -0300 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:41 -0500 |
commit | adb3993ba087ede46f62d5f018e17b07e99b5260 (patch) | |
tree | 67b4fa7e224f09d21eb76060422ca23e50e6dfe0 /arch/common/md5.h | |
parent | b3e31ae3787c8806f48c85a52bba9aa3554e2c07 (diff) | |
parent | 11b8179a57e675c6672cbe649c655230ae3e9744 (diff) |
Import Debian changes 0.4.2.1-1
hardinfo (0.4.2.1-1) unstable; urgency=low
* New upstream release.
* Fixed segfault on device entry (Closes: #387955)
Diffstat (limited to 'arch/common/md5.h')
-rw-r--r-- | arch/common/md5.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/arch/common/md5.h b/arch/common/md5.h index 256d6c3b..95d683bd 100644 --- a/arch/common/md5.h +++ b/arch/common/md5.h @@ -1,6 +1,6 @@ /* * HardInfo - Displays System Information - * Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@linuxmag.com.br> + * Copyright (C) 2003-2007 Leandro A. F. Pereira <leandro@linuxmag.com.br> * * 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 <md5.h> -gchar * +static void benchmark_md5(void) { struct MD5Context ctx; @@ -33,12 +33,10 @@ benchmark_md5(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 +57,7 @@ benchmark_md5(void) g_timer_destroy(timer); g_free(bdata_path); - - gchar *retval = g_strdup_printf("[Results <i>(in seconds; lower is better)</i>]\n" - "<b>This Machine</b>=<b>%.2f</b>\n", elapsed); - return benchmark_include_results(retval, "MD5"); + + bench_results[BENCHMARK_MD5] = 312.0 / elapsed; } |