Permalink
Browse files

bench_results: bug fix for cpus with mixed config

Signed-off-by: Burt P <pburt0@gmail.com>
  • Loading branch information...
bp0 authored and lpereira committed Sep 30, 2018
1 parent ef422cf commit ee4f894bd87ad9e246c3d973aa3882f24cb19e04
Showing with 3 additions and 2 deletions.
  1. +3 −2 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);

0 comments on commit ee4f894

Please sign in to comment.