]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2372] use the END_OF_STREAM constant instead of hardocded condition of '< 0'
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 2 Nov 2012 22:29:15 +0000 (15:29 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 2 Nov 2012 22:29:15 +0000 (15:29 -0700)
src/lib/dns/master_lexer.cc

index 7eec36fdf0795ceec2cc967106118d158179a276..737844bb1d8aac5ee1367e4262170af4df9b7806 100644 (file)
@@ -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);