Commit e0c3f4c4 authored by Suraj Upadhyay's avatar Suraj Upadhyay Committed by David S. Miller

net: decnet: af_decnet: Simplify goto loop.

Replace goto loop with while loop.
Signed-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c4fefd5a
...@@ -2134,14 +2134,11 @@ static struct sock *dn_socket_get_next(struct seq_file *seq, ...@@ -2134,14 +2134,11 @@ static struct sock *dn_socket_get_next(struct seq_file *seq,
struct dn_iter_state *state = seq->private; struct dn_iter_state *state = seq->private;
n = sk_next(n); n = sk_next(n);
try_again: while (!n) {
if (n) if (++state->bucket >= DN_SK_HASH_SIZE)
goto out; break;
if (++state->bucket >= DN_SK_HASH_SIZE) n = sk_head(&dn_sk_hash[state->bucket]);
goto out; }
n = sk_head(&dn_sk_hash[state->bucket]);
goto try_again;
out:
return n; return n;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment