netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pppoe: fix compiler warning
@ 2008-06-24 16:00 Patrick McHardy
  2008-06-24 16:12 ` Herbert Xu
  2008-06-24 20:35 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick McHardy @ 2008-06-24 16:00 UTC (permalink / raw)
  To: David S. Miller; +Cc: Herbert Xu, Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 764 bytes --]

pppoe: fix compiler warning

Fix warning introduced by 392fdb0 (net pppoe: Check packet length on all receive paths):

drivers/net/pppoe.c: In function 'pppoe_recvmsg':
drivers/net/pppoe.c:945: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index bafb69b..fc6f4b8 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -942,7 +942,7 @@ static int pppoe_recvmsg(struct kiocb *iocb, struct socket *sock,
 	m->msg_namelen = 0;
 
 	if (skb) {
-		total_len = min(total_len, skb->len);
+		total_len = min_t(size_t, total_len, skb->len);
 		error = skb_copy_datagram_iovec(skb, 0, m->msg_iov, total_len);
 		if (error == 0)
 			error = total_len;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-25  0:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 16:00 pppoe: fix compiler warning Patrick McHardy
2008-06-24 16:12 ` Herbert Xu
2008-06-24 20:35 ` David Miller
2008-06-25  0:11   ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).