Browse Source

[2372] use the END_OF_STREAM constant instead of hardocded condition of '< 0'

JINMEI Tatuya 12 years ago
parent
commit
5044adfc3d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/dns/master_lexer.cc

+ 1 - 1
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);