ppp_generic: Help GCC see that 'flen' is always initialized.
authorDavid S. Miller <davem@davemloft.net>
Wed, 19 Aug 2009 20:55:55 +0000 (13:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Aug 2009 20:55:55 +0000 (13:55 -0700)
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 a53a8b56827cc429c6d9f861ad558beeb5f6103f
("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>
drivers/net/ppp_generic.c

index 7dd0868f983ae8df9a3578db8554b7d2b2cba51e..35be2e8f0c989916c30e50313877e4d9eb71fc3d 100644 (file)
@@ -1431,6 +1431,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
                *otherwise divide it according to the speed
                *of the channel we are going to transmit on
                */
+               flen = len;
                if (nfree > 0) {
                        if (pch->speed == 0) {
                                flen = totlen/nfree     ;