Browse Source

[2512] Combine resize() call with the constructor

Mukund Sivaraman 11 years ago
parent
commit
8c77a05c85
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/lib/dns/rdata/generic/caa_257.cc

+ 1 - 2
src/lib/dns/rdata/generic/caa_257.cc

@@ -169,8 +169,7 @@ CAA::CAA(InputBuffer& buffer, size_t rdata_len) {
                   "RDATA is too short for CAA tag field");
     }
 
-    vector<uint8_t> tag_vec;
-    tag_vec.resize(tag_length);
+    std::vector<uint8_t> tag_vec(tag_length);
     buffer.readData(&tag_vec[0], tag_length);
     std::string tag(tag_vec.begin(), tag_vec.end());
     rdata_len -= tag_length;