BIND 10 trac2157_2, updated. 261d1e5735e818cbf12cd6d004faf0ccc86bdaf4 [2157] style fix: explicitly convert bit operation to bool

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Dec 21 07:00:54 UTC 2012


The branch, trac2157_2 has been updated
       via  261d1e5735e818cbf12cd6d004faf0ccc86bdaf4 (commit)
       via  cbc4276308e412d456a20e5eaf816af86ecac82a (commit)
      from  b0b2c34b61603f6a2676f139d5ad328ac1f3cdc5 (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 261d1e5735e818cbf12cd6d004faf0ccc86bdaf4
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Dec 20 23:00:39 2012 -0800

    [2157] style fix: explicitly convert bit operation to bool

commit cbc4276308e412d456a20e5eaf816af86ecac82a
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Dec 20 22:56:54 2012 -0800

    [2157] style fix: folded a long line

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

Summary of changes:
 src/bin/auth/tests/auth_srv_unittest.cc       |    3 ++-
 src/bin/auth/tests/statistics_unittest.cc.pre |   10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc
index dc48070..487ce6c 100644
--- a/src/bin/auth/tests/auth_srv_unittest.cc
+++ b/src/bin/auth/tests/auth_srv_unittest.cc
@@ -1172,7 +1172,8 @@ TEST_F(AuthSrvTest, queryCounterTruncTest) {
     // Create UDP message and process.
     // large-rdata.example.com. TXT; expect it exceeds 512 octet
     UnitTestUtil::createRequestMessage(request_message, Opcode::QUERY(),
-                                       default_qid, Name("large-rdata.example.com."),
+                                       default_qid,
+                                       Name("large-rdata.example.com."),
                                        RRClass::IN(), RRType::TXT());
     createRequestPacket(request_message, IPPROTO_UDP);
     server.processMessage(*io_message, *parse_message, *response_obuffer,
diff --git a/src/bin/auth/tests/statistics_unittest.cc.pre b/src/bin/auth/tests/statistics_unittest.cc.pre
index f4762a7..dabb556 100644
--- a/src/bin/auth/tests/statistics_unittest.cc.pre
+++ b/src/bin/auth/tests/statistics_unittest.cc.pre
@@ -175,10 +175,10 @@ TEST_F(CountersTest, incrementProtocolType) {
     //      ipv6   tcp
     int count_v4 = 0, count_v6 = 0, count_udp = 0, count_tcp = 0;
     for (int i = 0; i < 4; ++i) {
-        const enum MessageAttributes::IPVersion af = i & 1 ?
+        const enum MessageAttributes::IPVersion af = (i & 1) != 0 ?
             MessageAttributes::IP_VERSION_IPV4 :
             MessageAttributes::IP_VERSION_IPV6;
-        const enum MessageAttributes::TransportProtocol proto = i & 2 ?
+        const enum MessageAttributes::TransportProtocol proto = (i & 2) != 0 ?
             MessageAttributes::TRANSPORT_UDP :
             MessageAttributes::TRANSPORT_TCP;
 
@@ -326,9 +326,9 @@ TEST_F(CountersTest, incrementTSIG) {
     // badsig can't be true if the message does not have signature.
     int count_req_tsig = 0, count_res_tsig = 0, count_badsig = 0;
     for (int i = 0; i < 3; ++i) {
-        const bool is_req_tsig = (i == 2) ? true : i & 1;
-        const bool is_res_tsig = i & 1;
-        const bool is_badsig = i & 2;
+        const bool is_req_tsig = (i == 2) ? true : (i & 1) != 0;
+        const bool is_res_tsig = (i & 1) != 0;
+        const bool is_badsig = (i & 2) != 0;
         buildSkeletonMessage(msgattrs);
         msgattrs.setRequestSig(is_req_tsig, is_badsig);
         msgattrs.setResponseSigTSIG(is_res_tsig);



More information about the bind10-changes mailing list