Skip to content

Fix order of if conditions to avoid unreachable code

Christian Boltz requested to merge cboltz/apparmor:cboltz-parser-deadcode into master

If else if (preprocess_only) is true, the more strict condition else if (!include_file && preprocess_only) won't be reached if it gets checked after the shorter condition.

Exchange the two sections so that both code paths can be reached.

Fixes coverity CID 312499: Control flow issues (DEADCODE)

This was probably introduced in 7dcf013b / !743 (merged) which means we'll need to backport this fix to 3.0 and 3.1.

Merge request reports

Loading