mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 14:12:33 +00:00
Move reset results, DLM indices, ALUA lookup state, per-iteration buffer and sense temporaries, iSER completion bounds and KUnit fixture counters into the branches or loops that consume them. Each is initialized before use in its new scope. Keep counters carrying state across iterations outside their loops. Preserve lock pairs, error handling, debug guards and fixture assertions. Cppcheck reports variableScope in scst_copy_to_dlm(), scst_target_reset(), scst_lun_reset() and scst_check_alua_invariant(): The scope of the variable 'i' can be reduced. The scope of the variable 'rc' can be reduced. The scope of the variable 'expected_state' can be reduced.