From: Jinhee Choi Date: Wed, 20 Dec 2017 01:52:30 +0000 (+0900) Subject: pass: hal: Fix wrong format string of stat.load variable X-Git-Tag: submit/tizen_4.0/20171220.050834~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b3c2aeca81e66fcb543acedbda2c7387d352652;p=platform%2Fcore%2Fsystem%2Fpass.git pass: hal: Fix wrong format string of stat.load variable 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 [cw00.choi: Add the patch description' Signed-off-by: Chanwoo Choi --- diff --git a/src/pass/pass-hal.c b/src/pass/pass-hal.c index fb9fe0e..d969a5d 100644 --- a/src/pass/pass-hal.c +++ b/src/pass/pass-hal.c @@ -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;