Browse Source

simplification by eliminating unnecessary temporary variables.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@556 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
7cb0576d88
1 changed files with 4 additions and 6 deletions
  1. 4 6
      src/bin/parkinglot/parkinglot.cc

+ 4 - 6
src/bin/parkinglot/parkinglot.cc

@@ -140,9 +140,8 @@ ParkingLot::processMessage() {
                 for (RRsetIterator it = msg.beginSection(Section::ANSWER());
                      it != msg.endSection(Section::ANSWER());
                      ++it) {
-                    RRsetPtr rrset = (*it);
-                    if (rrset->getType() == RRType::NS()) {
-                        RdataIteratorPtr rrsetit = rrset->getRdataIterator();
+                    if ((*it)->getType() == RRType::NS()) {
+                        RdataIteratorPtr rrsetit = (*it)->getRdataIterator();
                         for (rrsetit->first();
                              !rrsetit->isLast();
                              rrsetit->next()) {
@@ -161,9 +160,8 @@ ParkingLot::processMessage() {
                 for (RRsetIterator it = msg.beginSection(Section::ANSWER());
                      it != msg.endSection(Section::ANSWER());
                      ++it) {
-                    RRsetPtr rrset = (*it);
-                    if (rrset->getType() == RRType::NS()) {
-                        RdataIteratorPtr rrsetit = rrset->getRdataIterator();
+                    if ((*it)->getType() == RRType::NS()) {
+                        RdataIteratorPtr rrsetit = (*it)->getRdataIterator();
                         for (rrsetit->first();
                              !rrsetit->isLast();
                              rrsetit->next()) {