]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tipc: fix a loop style problem
authorJon Paul Maloy <jon.maloy@ericsson.com>
Fri, 14 Feb 2014 21:40:43 +0000 (16:40 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Feb 2014 05:26:26 +0000 (00:26 -0500)
commit074bb43e9e594bec647ec45cc5bbc8c1ac2306aa
treeae83abaf50cca7cdf6f1f295e2b3821ad8ada4e1
parent6dd3c9ec2387725a8e529fae64415cd538b955b7
tipc: fix a loop style problem

In commit 7d33939f475d403e79124e3143d7951dcfe8629f
("tipc: delay delete of link when failover is needed") we
introduced a loop for finding and removing a link pointer
in an array. The removal is done after we have left the loop,
giving the impression that one may remove the wrong pointer
if no matching element is found.

This is not really a bug, since we know that there will always
be a matching element, but it looks wrong, and causes a smatch
warning.

We fix this loop with this commit.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/node.c