Browse Source

[master] catch by reference (caught by cppcheck)

Jelte Jansen 13 years ago
parent
commit
0b98878ed8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/lib/dns/rdata/any_255/tsig_250.cc
  2. 1 1
      src/lib/dns/rdata/in_1/srv_33.cc

+ 1 - 1
src/lib/dns/rdata/any_255/tsig_250.cc

@@ -153,7 +153,7 @@ TSIG::TSIG(const std::string& tsig_str) : impl_(NULL) {
         impl_ = new TSIGImpl(algorithm, time_signed, fudge, mac, orig_id,
                             error, other_data);
 
-    } catch (StringTokenError ste) {
+    } catch (const StringTokenError& ste) {
         isc_throw(InvalidRdataText, "Invalid TSIG text: " << ste.what() <<
                   ": " << tsig_str);
     }

+ 1 - 1
src/lib/dns/rdata/in_1/srv_33.cc

@@ -84,7 +84,7 @@ SRV::SRV(const string& srv_str) :
         }
 
         impl_ = new SRVImpl(priority, weight, port, targetname);
-    } catch (StringTokenError ste) {
+    } catch (const StringTokenError& ste) {
         isc_throw(InvalidRdataText, "Invalid SRV text: " <<
                   ste.what() << ": " << srv_str);
     }