提交 e0c3f4c4 编写于 作者: S Suraj Upadhyay 提交者: David S. Miller

net: decnet: af_decnet: Simplify goto loop.

Replace goto loop with while loop.
Signed-off-by: NSuraj Upadhyay <usuraj35@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c4fefd5a
......@@ -2134,14 +2134,11 @@ static struct sock *dn_socket_get_next(struct seq_file *seq,
struct dn_iter_state *state = seq->private;
n = sk_next(n);
try_again:
if (n)
goto out;
if (++state->bucket >= DN_SK_HASH_SIZE)
goto out;
n = sk_head(&dn_sk_hash[state->bucket]);
goto try_again;
out:
while (!n) {
if (++state->bucket >= DN_SK_HASH_SIZE)
break;
n = sk_head(&dn_sk_hash[state->bucket]);
}
return n;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册