Commit d8f5c49d authored by Jelte Jansen's avatar Jelte Jansen
Browse files

fixed the warnings/errors from cppcheck


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@702 e5f2f494-b856-4b98-b285-d166d9295462
parent 772fe0d8
......@@ -43,7 +43,7 @@ const unsigned char ITEM_LENGTH_8 = 0x20;
const unsigned char ITEM_LENGTH_MASK = 0x30;
static inline void
throwParseError(const std::string error, const std::string file, int line = 0, int pos = 0)
throwParseError(const std::string& error, const std::string& file, int line = 0, int pos = 0)
{
if (line != 0 || pos != 0) {
std::stringstream ss;
......@@ -574,6 +574,7 @@ decode_blob(std::stringstream& in, int& item_length)
in.read(buf, item_length);
if (in.fail()) {
delete[] buf;
throw DecodeError();
}
buf[item_length] = 0;
......@@ -593,6 +594,7 @@ decode_utf8(std::stringstream& in, int& item_length)
in.read(buf, item_length);
if (in.fail()) {
delete[] buf;
throw DecodeError();
}
buf[item_length] = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment