net: correct off-by-one write allocations reports
[safe/jmp/linux-2.6] / net / sched / sch_sfq.c
index ab8cfee..8706920 100644 (file)
@@ -149,7 +149,7 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
                break;
        }
        default:
-               h = (unsigned long)skb->dst ^ skb->protocol;
+               h = (unsigned long)skb_dst(skb) ^ skb->protocol;
                h2 = (unsigned long)skb->sk;
        }
 
@@ -281,7 +281,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        struct sfq_sched_data *q = qdisc_priv(sch);
        unsigned int hash;
        sfq_index x;
-       int ret;
+       int uninitialized_var(ret);
 
        hash = sfq_classify(skb, sch, &ret);
        if (hash == 0) {
@@ -435,7 +435,7 @@ static int sfq_init(struct Qdisc *sch, struct nlattr *opt)
        int i;
 
        q->perturb_timer.function = sfq_perturbation;
-       q->perturb_timer.data = (unsigned long)sch;;
+       q->perturb_timer.data = (unsigned long)sch;
        init_timer_deferrable(&q->perturb_timer);
 
        for (i = 0; i < SFQ_HASH_DIVISOR; i++)