j123b567 / scpi-parser

Open Source SCPI device library
BSD 2-Clause "Simplified" License
447 stars 191 forks source link

Remove always false blocks in parser.c #119

Closed ecrin4102 closed 3 years ago

ecrin4102 commented 3 years ago

For the first block, result can't be equal to 0 because the condition is already defined in the for. For the second block, the len is always incremented (at least by 1) or equal to 0.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.2%) to 93.351% when pulling 311a22c7a7e5518e06b0efb2ec6eb5aec453aaf2 on ecrin4102:master into a077a73a54ee0e789d7f39fc1587f20cb0cfd545 on j123b567:master.

j123b567 commented 3 years ago

You are right, it can never happen.