Skip to content

Commit 886f9fe

Browse files
committed
ppp_generic: Help GCC see that 'flen' is always initialized.
It's too stupid to see that we always set flen to something before we use it in ppp_mp_explode(): drivers/net/ppp_generic.c: In function 'ppp_push': drivers/net/ppp_generic.c:1314: warning: 'flen' may be used uninitialized in this function drivers/net/ppp_generic.c:1314: note: 'flen' was declared here This started warning after commit a53a8b5 ("ppp: fix lost fragments in ppp_mp_explode() (resubmit)") So just put an explicit unconditional initialization there to hush it up. Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0c3f450 commit 886f9fe

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/net/ppp_generic.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,6 +1431,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
14311431
*otherwise divide it according to the speed
14321432
*of the channel we are going to transmit on
14331433
*/
1434+
flen = len;
14341435
if (nfree > 0) {
14351436
if (pch->speed == 0) {
14361437
flen = totlen/nfree ;

0 commit comments

Comments
 (0)