Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7ef6715 authored by Gao Feng's avatar Gao Feng Committed by David S. Miller
Browse files

net: ping: Use right format specifier to avoid type casting



The inet_num is u16, so use %hu instead of casting it to int. And
the sk_bound_dev_if is int actually, so it needn't cast to int.

Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0ee28e31
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -433,9 +433,9 @@ int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
		goto out;
		goto out;
	}
	}


	pr_debug("after bind(): num = %d, dif = %d\n",
	pr_debug("after bind(): num = %hu, dif = %d\n",
		 (int)isk->inet_num,
		 isk->inet_num,
		 (int)sk->sk_bound_dev_if);
		 sk->sk_bound_dev_if);


	err = 0;
	err = 0;
	if (sk->sk_family == AF_INET && isk->inet_rcv_saddr)
	if (sk->sk_family == AF_INET && isk->inet_rcv_saddr)