From: JINMEI Tatuya Date: Fri, 2 Nov 2012 22:29:15 +0000 (-0700) Subject: [2372] use the END_OF_STREAM constant instead of hardocded condition of '< 0' X-Git-Tag: trac2487_base~1^2~21^2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5044adfc3df675aad9dc287af4a3d799d40dfd80;p=thirdparty%2Fkea.git [2372] use the END_OF_STREAM constant instead of hardocded condition of '< 0' --- diff --git a/src/lib/dns/master_lexer.cc b/src/lib/dns/master_lexer.cc index 7eec36fdf0..737844bb1d 100644 --- a/src/lib/dns/master_lexer.cc +++ b/src/lib/dns/master_lexer.cc @@ -208,7 +208,7 @@ Start::handle(MasterLexer& lexer, MasterLexer::Options& options, { while (true) { const int c = getLexerImpl(lexer)->source_->getChar(); - if (c < 0) { + if (c == InputSource::END_OF_STREAM) { // TODO: handle unbalance cases getLexerImpl(lexer)->last_was_eol_ = false; getLexerImpl(lexer)->token_ = Token(Token::END_OF_FILE);