]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2512] Combine resize() call with the constructor
authorMukund Sivaraman <muks@isc.org>
Tue, 18 Feb 2014 05:16:09 +0000 (10:46 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 18 Feb 2014 05:16:09 +0000 (10:46 +0530)
src/lib/dns/rdata/generic/caa_257.cc

index 9e6fa9bab552162e3aebfc490abea2e7f8f7071e..7d46a576627f64ee29116753e3643c896cf52279 100644 (file)
@@ -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;