BIND 10 trac781, updated. 4f1d8d0f2ce99880306f7926a23b28f1aa8e4fd9 [trac781] trivial editorial cleanups: - removed redundant white spaces - added () around 'return'

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Apr 12 17:41:06 UTC 2011


The branch, trac781 has been updated
       via  4f1d8d0f2ce99880306f7926a23b28f1aa8e4fd9 (commit)
      from  400d3b61a32c0fc47c5f41a93ea649fbde6a5445 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4f1d8d0f2ce99880306f7926a23b28f1aa8e4fd9
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Tue Apr 12 10:40:38 2011 -0700

    [trac781] trivial editorial cleanups:
    - removed redundant white spaces
    - added () around 'return'

-----------------------------------------------------------------------

Summary of changes:
 src/lib/crypto/tests/crypto_unittests.cc |   12 ++++++------
 src/lib/dns/tests/tsigkey_unittest.cc    |    2 +-
 src/lib/dns/tsigkey.cc                   |    8 ++++----
 3 files changed, 11 insertions(+), 11 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/crypto/tests/crypto_unittests.cc b/src/lib/crypto/tests/crypto_unittests.cc
index abe2f72..30196b9 100644
--- a/src/lib/crypto/tests/crypto_unittests.cc
+++ b/src/lib/crypto/tests/crypto_unittests.cc
@@ -31,15 +31,15 @@ namespace {
             ASSERT_EQ(buf_d[i], data[i]);
         }
     }
-    
+
     void doHMACTest(std::string data, std::string key_str,
                     uint8_t* expected_hmac, size_t hmac_len) {
         OutputBuffer data_buf(data.size());
         data_buf.writeData(data.c_str(), data.size());
         OutputBuffer hmac_sig(1);
-        
+
         TSIGKey key(key_str);
-        
+
         signHMAC(data_buf, key, hmac_sig);
         checkBuffer(hmac_sig, expected_hmac, hmac_len);
         EXPECT_TRUE(verifyHMAC(data_buf, key, hmac_sig));
@@ -91,7 +91,7 @@ TEST(CryptoTest, HMAC_MD5_RFC2202_SIGN) {
     doHMACTest("Test With Truncation",
                "test.example:DAwMDAwMDAwMDAwMDAwMDA==:hmac-md5.sig-alg.reg.int",
                hmac_expected5, 16);
-               
+
     uint8_t hmac_expected6[] = { 0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7,
                                  0xbf, 0x8f, 0x0b, 0x62, 0xe6, 0xce,
                                  0x61, 0xb9, 0xd0, 0xcd };
@@ -164,7 +164,7 @@ TEST(CryptoTest, HMAC_SHA1_RFC2202_SIGN) {
     doHMACTest("Test With Truncation",
                "test.example:DAwMDAwMDAwMDAwMDAwMDAwMDAw=:hmac-sha1",
                hmac_expected5, 20);
-               
+
     uint8_t hmac_expected6[] = { 0xaa, 0x4a, 0xe5, 0xe1, 0x52, 0x72,
                                  0xd0, 0x0e, 0x95, 0x70, 0x56, 0x37,
                                  0xce, 0x8a, 0x3b, 0x55, 0xed, 0x40,
@@ -278,7 +278,7 @@ TEST(CryptoTest, BadKey) {
 
     OutputBuffer data_buf(0);
     OutputBuffer hmac_sig(1);
-    
+
     EXPECT_THROW(signHMAC(data_buf, bad_key, hmac_sig), BadKey);
     EXPECT_THROW(verifyHMAC(data_buf, bad_key, hmac_sig), BadKey);
 }
diff --git a/src/lib/dns/tests/tsigkey_unittest.cc b/src/lib/dns/tests/tsigkey_unittest.cc
index d4ce3ce..f372c45 100644
--- a/src/lib/dns/tests/tsigkey_unittest.cc
+++ b/src/lib/dns/tests/tsigkey_unittest.cc
@@ -232,7 +232,7 @@ TEST(TSIGTest, TSIGKeyFromToString) {
     TSIGKey k2 = TSIGKey("test.example.:MSG6Ng==:hmac-md5.sig-alg.reg.int.");
     TSIGKey k3 = TSIGKey("test.example:MSG6Ng==");
     TSIGKey k4 = TSIGKey(Name("test.example."), Name("hmac-sha1."), NULL, 0);
-    
+
     EXPECT_EQ("test.example.:MSG6Ng==:hmac-md5.sig-alg.reg.int.",
               k1.toText());
     EXPECT_EQ("test.example.:MSG6Ng==:hmac-md5.sig-alg.reg.int.",
diff --git a/src/lib/dns/tsigkey.cc b/src/lib/dns/tsigkey.cc
index e27d849..6ada878 100644
--- a/src/lib/dns/tsigkey.cc
+++ b/src/lib/dns/tsigkey.cc
@@ -82,7 +82,7 @@ TSIGKey::TSIGKey(const std::string& str) : impl_(NULL) {
         }
 
         std::string secret_str = str.substr(pos + 1, pos2 - pos - 1);
-    
+
         vector<uint8_t> secret;
         decodeBase64(secret_str, secret);
         unsigned char secret_b[secret.size()];
@@ -155,9 +155,9 @@ TSIGKey::toText() const {
         secret_v.push_back(secret_b[i]);
     }
     std::string secret_str = encodeBase64(secret_v);
-    
-    return getKeyName().toText() + ":" + secret_str + ":" +
-           getAlgorithmName().toText();
+
+    return (getKeyName().toText() + ":" + secret_str + ":" +
+            getAlgorithmName().toText());
 }
 
 const




More information about the bind10-changes mailing list