net: decnet: af_decnet: Simplify goto loop.

Replace goto loop with while loop.

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Suraj Upadhyay 2020-07-17 00:46:45 +05:30 committed by David S. Miller
parent c4fefd5a33
commit e0c3f4c4fd
1 changed files with 5 additions and 8 deletions

View File

@ -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;
}