BIND 10 trac2384, updated. 4e410c83e9fb78be7c548c1184769f5a8a584b2c [2384] style nits: typo, folded short lines, unnecessary ; , paren for sizeof

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Nov 6 07:13:57 UTC 2012


The branch, trac2384 has been updated
       via  4e410c83e9fb78be7c548c1184769f5a8a584b2c (commit)
      from  0f9fc66cfe44292f46f2a49841b966ee2ee18bc6 (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 4e410c83e9fb78be7c548c1184769f5a8a584b2c
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Mon Nov 5 23:13:10 2012 -0800

    [2384] style nits: typo, folded short lines, unnecessary ;, paren for sizeof

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

Summary of changes:
 src/lib/dns/rrttl.cc |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/rrttl.cc b/src/lib/dns/rrttl.cc
index 667b634..e8a3de4 100644
--- a/src/lib/dns/rrttl.cc
+++ b/src/lib/dns/rrttl.cc
@@ -60,7 +60,7 @@ namespace dns {
 RRTTL::RRTTL(const std::string& ttlstr) {
     // We use a larger data type during the computation. This is because
     // some compilers don't fail when out of range, so we check the range
-    // ourself later.
+    // ourselves later.
     int64_t val = 0;
 
     const string::const_iterator end = ttlstr.end();
@@ -69,14 +69,13 @@ RRTTL::RRTTL(const std::string& ttlstr) {
     try {
         while (pos != end) {
             // Find the first unit, if there's any.
-            const string::const_iterator unit = find_if(pos, end,
-                                                        myIsalpha);
+            const string::const_iterator unit = find_if(pos, end, myIsalpha);
             // Default multiplication if no unit.
             uint32_t multiply = 1;
             if (unit != end) {
                 // Find the unit and get the size.
                 bool found = false;
-                for (size_t i = 0; i < sizeof units / sizeof *units; ++i) {
+                for (size_t i = 0; i < sizeof(units) / sizeof(*units); ++i) {
                     if (toupper(*unit) == units[i].unit) {
                         found = true;
                         multiply = units[i].multiply;
@@ -99,7 +98,7 @@ RRTTL::RRTTL(const std::string& ttlstr) {
             if (pos != end) {
                 ++pos;
             }
-        };
+        }
     } catch (const boost::bad_lexical_cast&) {
         isc_throw(InvalidRRTTL, "invalid TTL");
     }



More information about the bind10-changes mailing list