From: Mukund Sivaraman Date: Tue, 18 Feb 2014 13:03:27 +0000 (+0530) Subject: [2426] Add a comment on why the ungetToken() is necessary X-Git-Tag: bind10-1.2.0beta1-release~43^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c94286b3fcf47697829b2edba32cd47ed090bd6;p=thirdparty%2Fkea.git [2426] Add a comment on why the ungetToken() is necessary --- diff --git a/src/lib/dns/rdata.cc b/src/lib/dns/rdata.cc index c5ece2741a..533b325297 100644 --- a/src/lib/dns/rdata.cc +++ b/src/lib/dns/rdata.cc @@ -247,6 +247,9 @@ Generic::constructFromLexer(MasterLexer& lexer) { lexer.getNextToken(MasterToken::STRING, true); if ((token.getType() == MasterToken::END_OF_FILE) || (token.getType() == MasterToken::END_OF_LINE)) { + // Unget the last read token as createRdata() expects us + // to leave it at the end-of-line or end-of-file when we + // return. lexer.ungetToken(); break; }