Files
scst/usr
Gleb Chesnokov 8eea926316 scst: Simplify pointer tests and redundant condition grouping
Use direct pointer truth tests, put scalar constants on the right and
remove redundant parentheses from conditions and address expressions.
Preserve required precedence, dereferenced-pointer semantics and
short-circuit evaluation. Keep preprocessor expressions and disabled
debug alternatives intact.

Use __func__ for unchanged parameter-error diagnostics and correct the
byte-order diagnostic spelling.

Source review also identified eight negated negative-index tests in
the daemon's parameter lookup chains. Use explicit >= 0 comparisons
while retaining assignment order and short-circuit evaluation. This
readability cleanup does not remove assignment-in-condition findings.

Checkpatch reports COMPARISON_TO_NULL:

  Comparison to NULL could be written "target"

Checkpatch reports UNNECESSARY_PARENTHESES:

  Unnecessary parentheses around tlv->value

Checkpatch reports CONSTANT_COMPARISON, COMPARISON_TO_NULL. One example:

  Comparisons should place the constant on the right side of the test

Checkpatch reports CONSTANT_COMPARISON, EMBEDDED_FUNCTION_NAME,
TYPO_SPELLING. One example:

  Comparisons should place the constant on the right side of the test
2026-10-21 22:12:26 +03:00
..