Skip to content

Commit

Permalink
ipmr: Fix ptrdiff_t print formatting
Browse files Browse the repository at this point in the history
ipmr_vif_seq_show() prints the difference between two pointers with the
format string %2zd (z for size_t), however the correct format string is
%2td instead (t for ptrdiff_t).

The same bug in ip6mr_vif_seq_show() was already fixed long ago by
commit d430a22 ("bogus format in ip6mr").

Signed-off-by: James Hogan <[email protected]>
Cc: Alexey Kuznetsov <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
amalon authored and davem330 committed Jan 30, 2018
1 parent f813614 commit 91e6dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3022,7 +3022,7 @@ static int ipmr_vif_seq_show(struct seq_file *seq, void *v)
const char *name = vif->dev ? vif->dev->name : "none";

seq_printf(seq,
"%2zd %-10s %8ld %7ld %8ld %7ld %05X %08X %08X\n",
"%2td %-10s %8ld %7ld %8ld %7ld %05X %08X %08X\n",
vif - mrt->vif_table,
name, vif->bytes_in, vif->pkt_in,
vif->bytes_out, vif->pkt_out,
Expand Down

0 comments on commit 91e6dd8

Please sign in to comment.