]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2218] Move expression to simplify code
authorMukund Sivaraman <muks@isc.org>
Fri, 21 Sep 2012 03:09:51 +0000 (08:39 +0530)
committerMukund Sivaraman <muks@isc.org>
Fri, 21 Sep 2012 03:10:00 +0000 (08:40 +0530)
src/lib/datasrc/memory/zone_finder.cc

index e5785c8151d6486bdd7f3d045d3274ab7b7b05c1..b7c563baac645a1e11f013c4c5da5aa772ec3625 100644 (file)
@@ -664,12 +664,13 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
     // the deepest label one by one, until we find a name that has a matching
     // NSEC3 hash.
     for (unsigned int labels = qlabels; labels >= olabels; --labels) {
-        const std::string hlabel = (nsec3_calculate_)
-            ((labels == qlabels ?
-              name : name.split(qlabels - labels, labels)),
-             nsec3_data->iterations,
-             nsec3_data->getSaltData(),
-             nsec3_data->getSaltLen());
+        const Name& hname = (labels == qlabels ?
+                             name : name.split(qlabels - labels, labels));
+        const std::string hlabel =
+            (nsec3_calculate_) (hname,
+                                nsec3_data->iterations,
+                                nsec3_data->getSaltData(),
+                                nsec3_data->getSaltLen());
 
         LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_FINDNSEC3_TRYHASH).
             arg(name).arg(labels).arg(hlabel);