Skip to content

Commit e0c3f4c

Browse files
Suraj-Upadhyaydavem330
authored andcommitted
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>
1 parent c4fefd5 commit e0c3f4c

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

‎net/decnet/af_decnet.c‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,14 +2134,11 @@ static struct sock *dn_socket_get_next(struct seq_file *seq,
21342134
struct dn_iter_state *state = seq->private;
21352135

21362136
n = sk_next(n);
2137-
try_again:
2138-
if (n)
2139-
goto out;
2140-
if (++state->bucket >= DN_SK_HASH_SIZE)
2141-
goto out;
2142-
n = sk_head(&dn_sk_hash[state->bucket]);
2143-
goto try_again;
2144-
out:
2137+
while (!n) {
2138+
if (++state->bucket >= DN_SK_HASH_SIZE)
2139+
break;
2140+
n = sk_head(&dn_sk_hash[state->bucket]);
2141+
}
21452142
return n;
21462143
}
21472144

0 commit comments

Comments
 (0)