]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3312] Pass variables by reference (cppcheck report, etc.)
authorMukund Sivaraman <muks@isc.org>
Wed, 29 Jan 2014 16:40:40 +0000 (22:10 +0530)
committerMukund Sivaraman <muks@isc.org>
Wed, 29 Jan 2014 16:50:02 +0000 (22:20 +0530)
src/lib/datasrc/memory/zone_data_loader.cc
src/lib/datasrc/memory/zone_data_updater.h
src/lib/datasrc/tests/database_unittest.cc
src/lib/dhcp/iface_mgr.h
src/lib/dhcp/iface_mgr_bsd.cc
src/lib/dhcp/iface_mgr_linux.cc
src/lib/dhcp/iface_mgr_sun.cc

index e796dd4fcd003ed6adcd4c1609bbb4a6e5f83bbc..ddf6a1974a31a1b0fd7a80df862a663e6ec0e4c3 100644 (file)
@@ -69,7 +69,7 @@ typedef boost::function<void(isc::dns::ConstRRsetPtr)> LoadCallback;
 class ZoneDataLoader : boost::noncopyable {
 public:
     ZoneDataLoader(util::MemorySegment& mem_sgmt,
-                   const isc::dns::RRClass rrclass,
+                   const isc::dns::RRClass& rrclass,
                    const isc::dns::Name& zone_name, ZoneData& zone_data) :
         updater_(mem_sgmt, rrclass, zone_name, zone_data)
     {}
index e8826bdd5c7a17a8dc6b130bd900d8015933f6bf..5a45be43f9fe6de96aa03bfa49b313b7265e5aa7 100644 (file)
@@ -67,7 +67,7 @@ public:
     ///    on the given memory segment. Currently, at most one zone data
     ///    updater may exist on the same memory segment.
     ZoneDataUpdater(util::MemorySegment& mem_sgmt,
-                    isc::dns::RRClass rrclass,
+                    const isc::dns::RRClass& rrclass,
                     const isc::dns::Name& zone_name,
                     ZoneData& zone_data) :
        mem_sgmt_(mem_sgmt),
index 19d664f437e272fa50ee32511df3c609d0088186..17bf7ba4c70be8dba595676bea04d4e2761b2198 100644 (file)
@@ -1683,7 +1683,7 @@ findTestCommon(ZoneFinder& finder, const isc::dns::Name& name,
                const isc::dns::RRType& type,
                ConstZoneFinderContextPtr actual_result,
                const isc::dns::RRType& expected_type,
-               const isc::dns::RRTTL expected_ttl,
+               const isc::dns::RRTTL& expected_ttl,
                ZoneFinder::Result expected_result,
                const std::vector<string>& expected_rdatas,
                const std::vector<string>& expected_sig_rdatas,
@@ -1737,7 +1737,7 @@ doFindTest(ZoneFinder& finder,
            const isc::dns::Name& name,
            const isc::dns::RRType& type,
            const isc::dns::RRType& expected_type,
-           const isc::dns::RRTTL expected_ttl,
+           const isc::dns::RRTTL& expected_ttl,
            ZoneFinder::Result expected_result,
            const std::vector<std::string>& expected_rdatas,
            const std::vector<std::string>& expected_sig_rdatas,
@@ -1758,7 +1758,7 @@ doFindAtOriginTest(ZoneFinder& finder,
                    const isc::dns::Name& origin,
                    const isc::dns::RRType& type,
                    const isc::dns::RRType& expected_type,
-                   const isc::dns::RRTTL expected_ttl,
+                   const isc::dns::RRTTL& expected_ttl,
                    ZoneFinder::Result expected_result,
                    const std::vector<std::string>& expected_rdatas,
                    const std::vector<std::string>& expected_sig_rdatas,
@@ -1781,7 +1781,7 @@ doFindAtOriginTest(ZoneFinder& finder,
 void
 doFindAllTestResult(ZoneFinder& finder, const isc::dns::Name& name,
                     ZoneFinder::Result expected_result,
-                    const isc::dns::RRType expected_type,
+                    const isc::dns::RRType& expected_type,
                     std::vector<std::string> expected_rdata,
                     const isc::dns::Name& expected_name =
                     isc::dns::Name::ROOT_NAME(),
index 5a26c5deb8db8e71b05dbe9ba36fac23c8dd47ff..f6a861f948b6052718f8011c0ae281b066dee522 100644 (file)
@@ -1022,7 +1022,7 @@ private:
     /// error occurs during opening a socket, or NULL if exception should
     /// be thrown upon error.
     bool openMulticastSocket(Iface& iface,
-                             const isc::asiolink::IOAddress addr,
+                             const isc::asiolink::IOAddress& addr,
                              const uint16_t port,
                              IfaceMgrErrorMsgCallback error_handler = NULL);
 
index cf6c3e27726e3ccbcc8d94f4804396c74444a863..7a012282560a3ff2ca2e88075a31c1da7b28b9a1 100644 (file)
@@ -152,7 +152,7 @@ IfaceMgr::setMatchingPacketFilter(const bool /* direct_response_desired */) {
 
 bool
 IfaceMgr::openMulticastSocket(Iface& iface,
-                              const isc::asiolink::IOAddress addr,
+                              const isc::asiolink::IOAddress& addr,
                               const uint16_t port,
                               IfaceMgrErrorMsgCallback error_handler) {
     try {
index eaa625eb7de3422cfde65c034411bca8c05b5ea8..f4b0613dd8ab1675caf0d4090686977d556f3a20 100644 (file)
@@ -536,7 +536,7 @@ bool IfaceMgr::os_receive4(struct msghdr&, Pkt4Ptr&) {
 
 bool
 IfaceMgr::openMulticastSocket(Iface& iface,
-                              const isc::asiolink::IOAddress addr,
+                              const isc::asiolink::IOAddress& addr,
                               const uint16_t port,
                               IfaceMgrErrorMsgCallback error_handler) {
     // This variable will hold a descriptor of the socket bound to
index 0a9f9b4f9d2cae920982b22b47eb6313d8f95738..a78de8f4a56421a79d4cabd8247f3fc1f45ad171 100644 (file)
@@ -156,7 +156,7 @@ IfaceMgr::setMatchingPacketFilter(const bool /* direct_response_desired */) {
 
 bool
 IfaceMgr::openMulticastSocket(Iface& iface,
-                              const isc::asiolink::IOAddress addr,
+                              const isc::asiolink::IOAddress& addr,
                               const uint16_t port,
                               IfaceMgrErrorMsgCallback error_handler) {
     try {