From 23f0eedb8cefd2b1eabc3755c609e9651542bae3 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 23 Apr 2014 15:38:13 -0400 Subject: [PATCH] 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 --- src/terminal/parser.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/terminal/parser.cc b/src/terminal/parser.cc index 32bd5b8..1a9acc5 100644 --- a/src/terminal/parser.cc +++ b/src/terminal/parser.cc @@ -104,9 +104,6 @@ std::list Parser::UTF8Parser::input( char c ) /* 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 ) { /* character was NUL, accept and clear buffer */ assert( buf_len == 1 );