Fix log format errors 01/196201/2 accepted/tizen/unified/20181227.102131 submit/tizen/20181227.045321
authorYu <jiung.yu@samsung.com>
Wed, 26 Dec 2018 04:31:03 +0000 (13:31 +0900)
committerYu <jiung.yu@samsung.com>
Wed, 26 Dec 2018 04:37:29 +0000 (13:37 +0900)
Change-Id: Iba778498c660e64d248628f5ee6bb21836f045c1
Signed-off-by: Yu Jiung <jiung.yu@samsung.com>
src/inm-rtnl.c
src/inm-statistics.c

index 98cdbf5f0792d296617800d3eb0130bcce072e52..cf1ca2e84806fd8cb1a0250fc47292a5189db429 100644 (file)
@@ -25,6 +25,8 @@
  * @version     0.1
  */
 
+#include <inttypes.h>
+
 #include <net/if.h>
 #include <netlink/addr.h>
 #include <netlink/route/addr.h>
@@ -160,7 +162,7 @@ static inline void __rtnl_link_log_stats(struct rtnl_link *p_rtnl_link,
 
        for (i = 0; rtnl_link_stat_str_s[i].str; ++i) {
                g_string_append_printf(rtnl_link_gs,
-                               "<Rtnl link states %s:%llu>",
+                               "<Rtnl link states %s:%" PRIu64 ">",
                                rtnl_link_stat_str_s[i].str,
                                rtnl_link_get_stat(p_rtnl_link, rtnl_link_stat_str_s[i].stat_num));
        }
index 62eb5088dc97f5d63847ad4bd1986365a9aa3963..b4d62abac7d980f308c715f9a203f62b42b27c8d 100644 (file)
@@ -83,9 +83,11 @@ static gboolean __get_statistics(gpointer user_data)
 
                /* read interface statistics */
                sscanf(p_entry,
-                               "%llu %llu %lu %lu %lu %lu %lu %lu "
-                               "%llu %llu %lu %lu %lu %lu %lu %lu",
-                               (long long unsigned int *)&stats.rx_bytes, /* rx bytes */
+                               "%" G_GUINT64_FORMAT  " %" G_GUINT64_FORMAT
+                               " %lu %lu %lu %lu %lu %lu "
+                               "%" G_GUINT64_FORMAT  " %" G_GUINT64_FORMAT
+                               " %lu %lu %lu %lu %lu %lu",
+                               &stats.rx_bytes, /* rx bytes */
                                &stats.rx_packets,              /* rx packet */
                                &stats.rx_errs,                 /* rx errors */
                                &stats.rx_drop,                 /* rx dropped */
@@ -94,7 +96,7 @@ static gboolean __get_statistics(gpointer user_data)
                                &stats.rx_compressed,   /* rx compressed */
                                &stats.rx_multicast,    /* rx multicast */
 
-                               (long long unsigned int *)&stats.tx_bytes, /* tx bytes */
+                               &stats.tx_bytes, /* tx bytes */
                                &stats.tx_packets,              /* tx packet */
                                &stats.tx_errs,                 /* tx errors */
                                &stats.tx_drop,                 /* tx dropped */