]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3919] Assign typecode_ to avoid cppcheck warning
authorFrancis Dupont <fdupont@isc.org>
Wed, 24 Jun 2015 11:54:31 +0000 (13:54 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 24 Jun 2015 11:54:31 +0000 (13:54 +0200)
src/lib/dns/rrtype.cc

index 84892bfd7cf553be540cc9506967492b9b6e6757..7258c6894b9147737b2c4e5cca54e2ecfbc4e7e1 100644 (file)
@@ -32,10 +32,12 @@ namespace isc {
 namespace dns {
 
 RRType::RRType(const std::string& type_str) {
-    if (!RRParamRegistry::getRegistry().textToTypeCode(type_str, typecode_)) {
+    uint16_t typecode;
+    if (!RRParamRegistry::getRegistry().textToTypeCode(type_str, typecode)) {
         isc_throw(InvalidRRType,
                   "Unrecognized RR type string: " + type_str);
     }
+    typecode_ = typecode;
 }
 
 RRType::RRType(InputBuffer& buffer) {