pass: hal: Fix wrong format string of stat.load variable
authorJinhee Choi <jh106.choi@samsung.com>
Wed, 20 Dec 2017 01:52:30 +0000 (10:52 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 20 Dec 2017 05:07:15 +0000 (14:07 +0900)
This patch fixes the wrong format string of stat.load variable
from "%d" to "%u" because stat.load[] variable is unsigned integer.

Change-Id: Ic8d28782b36690242a3503f6967e9fd8bf550f11
Signed-off-by: Jinhee Choi <jh106.choi@samsung.com>
[cw00.choi: Add the patch description'
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-hal.c

index fb9fe0ef6a3003eae57978c744a30de315d857c5..d969a5d15f799f4ea2b5e777f0e2f0d5d5bbe884 100644 (file)
@@ -1035,7 +1035,7 @@ int pass_get_cpu_stats(struct pass_policy *policy)
                }
 
                for (j = 0; j < res->cdata.num_cpus; j++) {
-                       ret = fscanf(fp_stats, "%d", &stats[i].load[j]);
+                       ret = fscanf(fp_stats, "%u", &stats[i].load[j]);
                        if (ret < 0) {
                                fclose(fp_stats);
                                return -EIO;