Browse Source

[2522] initialize impl_ directly in TSIG lexer constructor

Paul Selkirk 12 years ago
parent
commit
da4f84b70f
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/lib/dns/rdata/any_255/tsig_250.cc

+ 2 - 3
src/lib/dns/rdata/any_255/tsig_250.cc

@@ -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.