Browse Source

[master] Use temporary variables in Name::compare()

Mukund Sivaraman 12 years ago
parent
commit
89e5546308
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/lib/dns/name.cc

+ 3 - 2
src/lib/dns/name.cc

@@ -435,8 +435,9 @@ Name::toText(bool omit_final_dot) const {
 
 NameComparisonResult
 Name::compare(const Name& other) const {
-    LabelSequence ls(*this);
-    return (ls.compare(LabelSequence(other)));
+    const LabelSequence ls1(*this);
+    const LabelSequence ls2(other);
+    return (ls1.compare(ls2));
 }
 
 bool