From: Chanwoo Choi Date: Sun, 7 Aug 2022 20:05:12 +0000 (+0900) Subject: lib: resource-monitor: Fix wrong data type of pass_resource_monitor_get_value_uint X-Git-Tag: submit/tizen/20220809.025855~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=223555aa02867b7865436e6d3b2045bdc0fa5332;p=platform%2Fcore%2Fsystem%2Fpass.git lib: resource-monitor: Fix wrong data type of pass_resource_monitor_get_value_uint uint need to use '%u' instead of '%d'. Fix wrong data type format. Change-Id: Ibec1b362cca3b1ad649ee1aedbf08368f1b1db24 Signed-off-by: Chanwoo Choi --- diff --git a/lib/resource-monitor/resource-monitor.c b/lib/resource-monitor/resource-monitor.c index 594a8ed..5951465 100644 --- a/lib/resource-monitor/resource-monitor.c +++ b/lib/resource-monitor/resource-monitor.c @@ -614,7 +614,7 @@ int pass_resource_monitor_get_value_uint(int id, int resource_id, u_int64_t attr } buffer[buffer_len] = '\0'; - if (sscanf(buffer, "%d$%d$%d", &response_req, value, &ret) < 3) + if (sscanf(buffer, "%d$%u$%d", &response_req, value, &ret) < 3) return -EINVAL; if (response_req != REQUEST_GET_VALUE_UINT) {