pppoe: fix compiler warning
Subsystems (2)
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
drivers/net/pppoe.c +1 -1
@@ -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;
Herbert Xu
Acked-byQuoted 8 lines · Patrick McHardy
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 castSigned-off-by Patrick McHardy <[email protected]>
Thanks Patrick!
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtDavid Miller
maintainerFrom: Patrick McHardy <[email protected]>
Date: Tue, 24 Jun 2008 18:00:06 +0200
Quoted 8 lines
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 castSigned-off-by Patrick McHardy <[email protected]>
Should already be fixed in net-2.6 by:
commit 2645a3c3761ac25498db2e627271016c849c68e1
Author: Stephen Hemminger <[email protected]> Date: Fri Jun 20 21:58:02 2008 -0700
pppoe: warning fix
Fix warning:
drivers/net/pppoe.c: In function 'pppoe_recvmsg':
drivers/net/pppoe.c:945: warning: comparison of distinct pointer types lacks a cast because skb->len is unsigned int and total_len is size_t
drivers/net/pppoe.c +1 -1
@@ -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;
Quoted 5 lines · David Miller
From: Patrick McHardy <[email protected]>
Date: Tue, 24 Jun 2008 18:00:06 +0200Quoted 2 lines
pppoe: fix compiler warning
Quoted 8 lines
Quoted 6 lines
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 castSigned-off-by Patrick McHardy <[email protected]>Should already be fixed in net-2.6 by:
My mistake, sorry :)