]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/isdn: delete double assignment
authorJulia Lawall <julia@diku.dk>
Tue, 26 Oct 2010 02:20:56 +0000 (02:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Oct 2010 19:23:21 +0000 (12:23 -0700)
commit395ca8c32128afe97932a6772d8fe71b20bc73a0
tree2b424d287bb44f83ee874ba90110d9d0d75c54c3
parentb2eab5e4d38ff87e1f6c5d3274422ab7a5cf8a4b
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>
drivers/isdn/hardware/mISDN/mISDNinfineon.c
drivers/isdn/hisax/l3_1tr6.c