Commit 3ffa9d6
ceph: 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: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>1 parent 57a5df0 commit 3ffa9d6
1 file changed
Lines changed: 15 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3183 | 3183 | | |
3184 | 3184 | | |
3185 | 3185 | | |
3186 | | - | |
| 3186 | + | |
3187 | 3187 | | |
3188 | 3188 | | |
3189 | | - | |
3190 | 3189 | | |
3191 | 3190 | | |
3192 | 3191 | | |
| |||
3213 | 3212 | | |
3214 | 3213 | | |
3215 | 3214 | | |
3216 | | - | |
3217 | | - | |
3218 | | - | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
3219 | 3218 | | |
3220 | 3219 | | |
3221 | 3220 | | |
3222 | 3221 | | |
3223 | | - | |
| 3222 | + | |
3224 | 3223 | | |
3225 | 3224 | | |
3226 | 3225 | | |
| |||
3770 | 3769 | | |
3771 | 3770 | | |
3772 | 3771 | | |
3773 | | - | |
3774 | | - | |
| 3772 | + | |
3775 | 3773 | | |
3776 | 3774 | | |
3777 | 3775 | | |
3778 | 3776 | | |
3779 | 3777 | | |
3780 | 3778 | | |
3781 | 3779 | | |
3782 | | - | |
3783 | | - | |
3784 | | - | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
3785 | 3783 | | |
3786 | | - | |
3787 | | - | |
| 3784 | + | |
| 3785 | + | |
3788 | 3786 | | |
3789 | 3787 | | |
3790 | | - | |
| 3788 | + | |
3791 | 3789 | | |
3792 | 3790 | | |
3793 | 3791 | | |
3794 | | - | |
| 3792 | + | |
3795 | 3793 | | |
3796 | 3794 | | |
3797 | | - | |
| 3795 | + | |
3798 | 3796 | | |
3799 | 3797 | | |
3800 | 3798 | | |
3801 | | - | |
| 3799 | + | |
3802 | 3800 | | |
3803 | 3801 | | |
3804 | 3802 | | |
| |||
0 commit comments