aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-10-25 22:20:56 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-27 15:23:21 -0400
commit4101e976e0376a1820ae55adf8bca7dda5089a7d (patch)
tree2b424d287bb44f83ee874ba90110d9d0d75c54c3 /drivers/isdn/hisax
parent13c3ab86f27967488b8182a173ebc899c9111bf0 (diff)
drivers/isdn: delete double assignment
Delete successive assignments to the same location. In the first case, the hscx array has two elements, so change the assignment to initialize the second one. In the second case, the two assignments are simply identical. Furthermore, neither is necessary, because the effect of the assignment is only visible in the next line, in the assignment in the if test. The patch inlines the right hand side value in the latter assignment and pulls that assignment out of the if test. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression i; @@ *i = ...; i = ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/l3_1tr6.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/isdn/hisax/l3_1tr6.c b/drivers/isdn/hisax/l3_1tr6.c
index b0554f80bfb3..ee4dae1382e0 100644
--- a/drivers/isdn/hisax/l3_1tr6.c
+++ b/drivers/isdn/hisax/l3_1tr6.c
@@ -164,11 +164,9 @@ l3_1tr6_setup(struct l3_process *pc, u_char pr, void *arg)
164 char tmp[80]; 164 char tmp[80];
165 struct sk_buff *skb = arg; 165 struct sk_buff *skb = arg;
166 166
167 p = skb->data;
168
169 /* Channel Identification */ 167 /* Channel Identification */
170 p = skb->data; 168 p = findie(skb->data, skb->len, WE0_chanID, 0);
171 if ((p = findie(p, skb->len, WE0_chanID, 0))) { 169 if (p) {
172 if (p[1] != 1) { 170 if (p[1] != 1) {
173 l3_1tr6_error(pc, "setup wrong chanID len", skb); 171 l3_1tr6_error(pc, "setup wrong chanID len", skb);
174 return; 172 return;