Commit 3302ffd
rbd: 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.
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: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>1 parent d7a2dc5 commit 3302ffd
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
759 | | - | |
760 | | - | |
| 759 | + | |
761 | 760 | | |
762 | 761 | | |
763 | 762 | | |
764 | 763 | | |
765 | 764 | | |
766 | | - | |
767 | | - | |
768 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
769 | 768 | | |
770 | | - | |
| 769 | + | |
771 | 770 | | |
772 | 771 | | |
773 | 772 | | |
774 | 773 | | |
775 | 774 | | |
776 | | - | |
| 775 | + | |
777 | 776 | | |
778 | 777 | | |
779 | 778 | | |
| |||
0 commit comments