print-telnet: variable 'length' is updated, the new value is never used