]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2522] initialize impl_ directly in TSIG lexer constructor
authorPaul Selkirk <pselkirk@isc.org>
Wed, 8 May 2013 14:59:40 +0000 (10:59 -0400)
committerPaul Selkirk <pselkirk@isc.org>
Thu, 16 May 2013 03:37:33 +0000 (23:37 -0400)
src/lib/dns/rdata/any_255/tsig_250.cc

index e71e548a22617278b4307f853f56bd69d363adaa..955ddd454807d407d46954eeb70a51fce40eec0e 100644 (file)
@@ -138,7 +138,7 @@ TSIG::constructFromLexer(MasterLexer& lexer) {
     if (otherlen > 0xffff) {
         isc_throw(InvalidRdataText, "TSIG Other Len out of range");
     }
-    const string otherdata_txt = (otherlen > 0) ? 
+    const string otherdata_txt = (otherlen > 0) ?
             lexer.getNextToken(MasterToken::STRING).getString() : "";
     vector<uint8_t> other_data;
     decodeBase64(otherdata_txt, other_data);
@@ -239,9 +239,8 @@ TSIG::TSIG(const std::string& tsig_str) : impl_(NULL) {
 /// RDATA to be created
 TSIG::TSIG(MasterLexer& lexer, const Name*,
                MasterLoader::Options, MasterLoaderCallbacks&) :
-    impl_(NULL)
+    impl_(constructFromLexer(lexer))
 {
-    impl_ = constructFromLexer(lexer);
 }
 
 /// \brief Constructor from wire-format data.