Received: with ECARTIS (v1.0.0; list netdev); Wed, 29 Dec 2004 19:40:48 -0800 (PST) Received: from kaber.coreworks.de ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iBU3eFZv031695 for ; Wed, 29 Dec 2004 19:40:36 -0800 Received: from eru.coreworks.de ([172.16.0.2] helo=trash.net) by kaber.coreworks.de with esmtp (Exim 4.34) id 1CjrCP-0002JG-8G; Thu, 30 Dec 2004 04:42:05 +0100 Message-ID: <41D378CD.9090407@trash.net> Date: Thu, 30 Dec 2004 04:41:01 +0100 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: jamal CC: Maillist netdev Subject: [PATCH PKT_SCHED 15/17]: Remove checks for impossible conditions in pedit action Content-Type: multipart/mixed; boundary="------------060903040607030803060503" X-Virus-Scanned: ClamAV 0.80/638/Tue Dec 21 14:41:34 2004 clamav-milter version 0.80j on 127.0.0.1 X-Virus-Status: Clean X-archive-position: 13193 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev This is a multi-part message in MIME format. --------------060903040607030803060503 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Remove checks for impossible conditions in pedit action. --------------060903040607030803060503 Content-Type: text/x-patch; name="15.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="15.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/12/30 03:47:30+01:00 kaber@coreworks.de # [PKT_SCHED]: Remove checks for impossible conditions in pedit action # # Signed-off-by: Patrick McHardy # # net/sched/pedit.c # 2004/12/30 03:47:24+01:00 kaber@coreworks.de +1 -11 # [PKT_SCHED]: Remove checks for impossible conditions in pedit action # # Signed-off-by: Patrick McHardy # diff -Nru a/net/sched/pedit.c b/net/sched/pedit.c --- a/net/sched/pedit.c 2004-12-30 04:02:01 +01:00 +++ b/net/sched/pedit.c 2004-12-30 04:02:01 +01:00 @@ -65,7 +65,7 @@ if (rtattr_parse(tb, TCA_PEDIT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0) return -1; - if (a == NULL || tb[TCA_PEDIT_PARMS - 1] == NULL) { + if (tb[TCA_PEDIT_PARMS - 1] == NULL) { printk("BUG: tcf_pedit_init called with NULL params\n"); return -1; } @@ -113,11 +113,6 @@ int i, munged = 0; u8 *pptr; - if (p == NULL) { - printk("BUG: tcf_pedit called with NULL params\n"); - return -1; /* change to something symbolic */ - } - if (!(skb->tc_verd & TC_OK2MUNGE)) { /* should we set skb->cloned? */ if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { @@ -189,11 +184,6 @@ struct tcf_t t; int s; - if (p == NULL) { - printk("BUG: tcf_pedit_dump called with NULL params\n"); - goto rtattr_failure; - } - s = sizeof(*opt) + p->nkeys * sizeof(struct tc_pedit_key); /* netlink spinlocks held above us - must use ATOMIC */ --------------060903040607030803060503--