Browse Source

[2387] Rearrange code

Mukund Sivaraman 12 years ago
parent
commit
f8205314f8
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/lib/dns/rdata/generic/dnskey_48.cc

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

@@ -280,12 +280,11 @@ DNSKEY::compare(const Rdata& other) const {
 uint16_t
 DNSKEY::getTag() const {
     if (impl_->algorithm_ == 1) {
-        const int len = impl_->keydata_.size();
-
         // See RFC 4034 appendix B.1 for why the key data must contain
         // at least 4 bytes with RSA/MD5: 3 trailing bytes to extract
         // the tag from, and 1 byte of exponent length subfield before
         // modulus.
+        const int len = impl_->keydata_.size();
         if (len < 4) {
             isc_throw(isc::OutOfRange,
                       "DNSKEY keydata too short for tag extraction");