From: Yu Date: Wed, 26 Dec 2018 04:31:03 +0000 (+0900) Subject: Fix log format errors X-Git-Tag: submit/tizen/20181227.045321^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F196201%2F2;p=platform%2Fcore%2Fconnectivity%2Finm-manager.git Fix log format errors Change-Id: Iba778498c660e64d248628f5ee6bb21836f045c1 Signed-off-by: Yu Jiung --- diff --git a/src/inm-rtnl.c b/src/inm-rtnl.c index 98cdbf5..cf1ca2e 100644 --- a/src/inm-rtnl.c +++ b/src/inm-rtnl.c @@ -25,6 +25,8 @@ * @version 0.1 */ +#include + #include #include #include @@ -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_stat_str_s[i].str, rtnl_link_get_stat(p_rtnl_link, rtnl_link_stat_str_s[i].stat_num)); } diff --git a/src/inm-statistics.c b/src/inm-statistics.c index 62eb508..b4d62ab 100644 --- a/src/inm-statistics.c +++ b/src/inm-statistics.c @@ -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 */