summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2014-07-21 10:44:45 -0700
committerThomas Haller <thaller@redhat.com>2014-07-21 19:59:39 +0200
commit956b758f7e58f683a3c6a20118cf8d4d203f8085 (patch)
tree4be75d64215834641939e41bf36091dced91081e
parent5f9eedc22d381ac8e234e0a649c4b3c9631b6124 (diff)
downloadlibnl-956b758f7e58f683a3c6a20118cf8d4d203f8085.tar.gz
xfrm: use the right specifier for uint64_t
This fixes compile warnings like this: xfrm/sp.c: In function 'xfrm_sp_dump_line': xfrm/sp.c:346:3: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Wformat=] sprintf (dir, "%llu", sp->lft->soft_byte_limit); Cc: Thomas Haller <thaller@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--lib/xfrm/sa.c8
-rw-r--r--lib/xfrm/sp.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/xfrm/sa.c b/lib/xfrm/sa.c
index 38c06fca..dc887a06 100644
--- a/lib/xfrm/sa.c
+++ b/lib/xfrm/sa.c
@@ -409,20 +409,20 @@ static void xfrm_sa_dump_line(struct nl_object *a, struct nl_dump_params *p)
if (sa->lft->soft_byte_limit == XFRM_INF)
sprintf (flags, "INF");
else
- sprintf (flags, "%llu", sa->lft->soft_byte_limit);
+ sprintf (flags, "%" PRIu64, sa->lft->soft_byte_limit);
if (sa->lft->soft_packet_limit == XFRM_INF)
sprintf (mode, "INF");
else
- sprintf (mode, "%llu", sa->lft->soft_packet_limit);
+ sprintf (mode, "%" PRIu64, sa->lft->soft_packet_limit);
nl_dump_line(p, "\t\tsoft limit: %s (bytes), %s (packets)\n", flags, mode);
if (sa->lft->hard_byte_limit == XFRM_INF)
sprintf (flags, "INF");
else
- sprintf (flags, "%llu", sa->lft->hard_byte_limit);
+ sprintf (flags, "%" PRIu64, sa->lft->hard_byte_limit);
if (sa->lft->hard_packet_limit == XFRM_INF)
sprintf (mode, "INF");
else
- sprintf (mode, "%llu", sa->lft->hard_packet_limit);
+ sprintf (mode, "%" PRIu64, sa->lft->hard_packet_limit);
nl_dump_line(p, "\t\thard limit: %s (bytes), %s (packets)\n", flags, mode);
nl_dump_line(p, "\t\tsoft add_time: %llu (seconds), soft use_time: %llu (seconds) \n",
sa->lft->soft_add_expires_seconds, sa->lft->soft_use_expires_seconds);
diff --git a/lib/xfrm/sp.c b/lib/xfrm/sp.c
index d8575021..e66924ba 100644
--- a/lib/xfrm/sp.c
+++ b/lib/xfrm/sp.c
@@ -343,19 +343,19 @@ static void xfrm_sp_dump_line(struct nl_object *a, struct nl_dump_params *p)
if (sp->lft->soft_byte_limit == XFRM_INF)
sprintf (dir, "INF");
else
- sprintf (dir, "%llu", sp->lft->soft_byte_limit);
+ sprintf (dir, "%" PRIu64, sp->lft->soft_byte_limit);
if (sp->lft->soft_packet_limit == XFRM_INF)
sprintf (action, "INF");
else
- sprintf (action, "%llu", sp->lft->soft_packet_limit);
+ sprintf (action, "%" PRIu64, sp->lft->soft_packet_limit);
if (sp->lft->hard_byte_limit == XFRM_INF)
sprintf (flags, "INF");
else
- sprintf (flags, "%llu", sp->lft->hard_byte_limit);
+ sprintf (flags, "%" PRIu64, sp->lft->hard_byte_limit);
if (sp->lft->hard_packet_limit == XFRM_INF)
sprintf (share, "INF");
else
- sprintf (share, "%llu", sp->lft->hard_packet_limit);
+ sprintf (share, "%" PRIu64, sp->lft->hard_packet_limit);
nl_dump_line(p, "\t\tsoft limit: %s (bytes), %s (packets) \n", dir, action);
nl_dump_line(p, "\t\thard limit: %s (bytes), %s (packets) \n", flags, share);
nl_dump_line(p, "\t\tsoft add_time: %llu (seconds), soft use_time: %llu (seconds) \n",