Parser::UTF8Parser::input: Remove dead code for negative size_t
size_t is unsigned. Fixes two issues found by the Coverity Scan service, one about the dead code and one about the std::string exception being uncaught by mosh-server. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
John Hood
parent
a38b6f61d5
commit
23f0eedb8c
@@ -104,9 +104,6 @@ std::list<Parser::Action *> Parser::UTF8Parser::input( char c )
|
|||||||
|
|
||||||
/* this returns 0 when n = 0! */
|
/* this returns 0 when n = 0! */
|
||||||
|
|
||||||
/* This function annoying returns a size_t so we have to check
|
|
||||||
the negative values first before the "> 0" branch */
|
|
||||||
|
|
||||||
if ( bytes_parsed == 0 ) {
|
if ( bytes_parsed == 0 ) {
|
||||||
/* character was NUL, accept and clear buffer */
|
/* character was NUL, accept and clear buffer */
|
||||||
assert( buf_len == 1 );
|
assert( buf_len == 1 );
|
||||||
|
|||||||
Reference in New Issue
Block a user