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>
This commit is contained in:
parent
5f9eedc22d
commit
956b758f7e
2 changed files with 8 additions and 8 deletions
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue