Commit edf5f05
ksmbd: replace usage of found with dedicated list iterator variable
To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.
To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].
This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 56b401f commit edf5f05
1 file changed
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6618 | 6618 | | |
6619 | 6619 | | |
6620 | 6620 | | |
6621 | | - | |
6622 | | - | |
| 6621 | + | |
6623 | 6622 | | |
6624 | 6623 | | |
6625 | 6624 | | |
| |||
6629 | 6628 | | |
6630 | 6629 | | |
6631 | 6630 | | |
6632 | | - | |
| 6631 | + | |
6633 | 6632 | | |
6634 | | - | |
| 6633 | + | |
6635 | 6634 | | |
6636 | | - | |
| 6635 | + | |
6637 | 6636 | | |
6638 | 6637 | | |
6639 | 6638 | | |
6640 | 6639 | | |
6641 | 6640 | | |
6642 | 6641 | | |
6643 | 6642 | | |
6644 | | - | |
| 6643 | + | |
6645 | 6644 | | |
6646 | 6645 | | |
6647 | 6646 | | |
6648 | 6647 | | |
6649 | 6648 | | |
6650 | 6649 | | |
6651 | 6650 | | |
6652 | | - | |
6653 | | - | |
| 6651 | + | |
| 6652 | + | |
6654 | 6653 | | |
6655 | 6654 | | |
6656 | | - | |
| 6655 | + | |
6657 | 6656 | | |
6658 | 6657 | | |
6659 | 6658 | | |
6660 | 6659 | | |
6661 | 6660 | | |
6662 | 6661 | | |
6663 | | - | |
| 6662 | + | |
6664 | 6663 | | |
6665 | 6664 | | |
6666 | 6665 | | |
6667 | 6666 | | |
6668 | 6667 | | |
6669 | | - | |
| 6668 | + | |
6670 | 6669 | | |
6671 | 6670 | | |
6672 | 6671 | | |
| |||
0 commit comments