pass: pmqos: print int64_t type on 32/64bit architecture properly 29/195629/1 accepted/tizen/unified/20181217.142346 submit/tizen/20181217.034218
authorDongwoo Lee <dwoo08.lee@samsung.com>
Mon, 17 Dec 2018 02:06:10 +0000 (11:06 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Mon, 17 Dec 2018 02:06:10 +0000 (11:06 +0900)
Since int64_t is translating into 'long long int' on 32bit, but
'long int' on 64bit. So, "%lld" cannot satisfying both architectures.
This patch uses PRId64 instead of "%lld" to adjust the format string
as following the corresponding architecture.

Change-Id: Iac0d14ac1ccff7b6fba187fc3205e2c81271727b
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/pass/pass-pmqos.c

index ceea62a..319e4d6 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/time.h>
+#include <inttypes.h>
 
 #include <pass/device-notifier.h>
 #include <pass/config-parser.h>
@@ -182,7 +183,7 @@ static int pmqos_notifier_cb(void *data, void *user_data)
 
                pmqos->scenarios[index].pmqos.locked_time = get_time_ms();
        } else {
-               _I("UnLock '%s' scenario for '%s' resource (%lldms)\n",
+               _I("UnLock '%s' scenario for '%s' resource (%"PRId64"ms)\n",
                        name, config_data->res_name,
                        (get_time_ms() - pmqos->scenarios[index].pmqos.locked_time));