HomeFreeBSD

indent(1): Fix off-by-one in control flow leading dead code.

Description

indent(1): Fix off-by-one in control flow leading dead code.

Coverity correctly reported that it's impossible for /comparison/ to be 0
here, because the only way for the for loop to end is by /comparison/
being < 0.

Fortunately the consequences of this bug weren't severe; for duplicated
entries in the typedef names file it would unnecessarily duplicate strings
with strdup(), but pointers to those would replace existing ones. So this
was a memory leak at worst.

CID: 1361477
Obtained from: Piotr Stephaniak

Details

Provenance
pfgAuthored on
Parents
rS304652: Fix missing substitution of @SBINDIR@ in resolvconf scripts
Branches
Unknown
Tags
Unknown