diff options
author | Burt P <pburt0@gmail.com> | 2018-09-30 17:06:02 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-10-02 07:13:15 -0700 |
commit | ee4f894bd87ad9e246c3d973aa3882f24cb19e04 (patch) | |
tree | f36987e4dd73eb8e01cb7d9dc64615c419eb134f | |
parent | ef422cf3b48012731fe4b27e631bf381e272d189 (diff) |
bench_results: bug fix for cpus with mixed config
Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r-- | modules/benchmark/bench_results.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/benchmark/bench_results.c b/modules/benchmark/bench_results.c index 66140761..92790edb 100644 --- a/modules/benchmark/bench_results.c +++ b/modules/benchmark/bench_results.c @@ -58,7 +58,7 @@ static char *cpu_config_retranslate(char *str, int force_en, int replacing) { t, f, mhz ); free(new_str); new_str = tmp; - c = strchr(c+1, '+'); + c = strchr(c+1, '+'); if (c) c++; /* move past the + */ } } else { sscanf(c, "%f", &f); @@ -72,6 +72,7 @@ static char *cpu_config_retranslate(char *str, int force_en, int replacing) { if (replacing) free(str); } + return new_str; } @@ -84,7 +85,7 @@ static float cpu_config_val(char *str) { if (strchr(str, 'x')) { while (c != NULL && sscanf(c, "%dx %f", &t, &f) ) { r += f * t; - c = strchr(c+1, '+'); + c = strchr(c+1, '+'); if (c) c++; /* move past the + */ } } else { sscanf(c, "%f", &r); |