Skip to contentSkip to conversation

2.4.19 ppp_generic.c warning fixed

PATCH New Grant Grundler 1 participant 1 message Sep 13, 2002 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.19 ppp_generic.c warning fixed

Paul,
Wearing my other hat (parisc-linux), I've a fix for "used before initialized" warning in ppp_generic.c.

The ret value might want to be something other than zero in the "if (skb) break;" condition.

thanks,
grant

Index: drivers/net/ppp_generic.c
===================================================================
RCS file: /var/cvs/linux/drivers/net/ppp_generic.c,v retrieving revision 1.11

net/ppp_generic.c 13 Sep 2002 05:57:15 -0000 renamed from net/ppp_generic.c 4 Aug 2002 22:58:31 -0000 1.11 +1 -1
diff -u -p -r1.11 ppp_generic.c
@@ -387,9 +387,9 @@ static ssize_t ppp_read(struct file *fil
        for (;;) {
                set_current_state(TASK_INTERRUPTIBLE);
                skb = skb_dequeue(&pf->rq);
+               ret = 0;
                if (skb)
                        break;
-               ret = 0;
                if (pf->dead)
                        break;
                ret = -EAGAIN;