cppcheck: remove unused variable
silence msvc warning about truncating double to float
msvc hinted that operator precedence might be an issue here

We convert the length to a bool then negate it, then compare it with > 0.
All a complicated way of checking if the buffer is empty.