Skip to content

Commit

Permalink
net: ax25: fix misuse of %x
Browse files Browse the repository at this point in the history
Pointers should be printed with %p or %px rather than
cast to long type and printed with %8.8lx.
Change %8.8lx to %p to print the pointer.

Signed-off-by: Fuqian Huang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Yellow-Pay authored and davem330 committed Apr 21, 2019
1 parent 05453ea commit 966cdde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ax25/af_ax25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1880,8 +1880,8 @@ static int ax25_info_show(struct seq_file *seq, void *v)
* magic dev src_addr dest_addr,digi1,digi2,.. st vs vr va t1 t1 t2 t2 t3 t3 idle idle n2 n2 rtt window paclen Snd-Q Rcv-Q inode
*/

seq_printf(seq, "%8.8lx %s %s%s ",
(long) ax25,
seq_printf(seq, "%p %s %s%s ",
ax25,
ax25->ax25_dev == NULL? "???" : ax25->ax25_dev->dev->name,
ax2asc(buf, &ax25->source_addr),
ax25->iamdigi? "*":"");
Expand Down

0 comments on commit 966cdde

Please sign in to comment.