Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Commit

Permalink
Fix invalid use of strcat
Browse files Browse the repository at this point in the history
  • Loading branch information
lpetre-ulb authored and jsturdy committed Mar 6, 2020
1 parent 0682249 commit bea638d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xhal/src/client/XHALDevice.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "xhal/client/XHALDevice.h"

#include <string>

xhal::client::XHALDevice::XHALDevice(const std::string& board_domain_name, const std::string& address_table_filename) :
xhal::client::XHALInterface(board_domain_name),
m_address_table_filename(address_table_filename)
Expand Down Expand Up @@ -62,7 +64,7 @@ uint32_t xhal::client::XHALDevice::readReg(std::string regName)
return result;
} else {
XHAL_ERROR("Register not found in address table!");
throw xhal::common::utils::XHALXMLParserException(strcat("XHAL XML exception: can't find node", regName.c_str()));
throw xhal::common::utils::XHALXMLParserException(std::string("XHAL XML exception: can't find node") + regName);
}
}

Expand Down Expand Up @@ -140,7 +142,7 @@ void xhal::client::XHALDevice::writeReg(std::string regName, uint32_t value)
}
} else {
XHAL_ERROR("Register not found in address table!");
throw xhal::common::utils::XHALXMLParserException(strcat("XHAL XML exception: can't find node", regName.c_str()));
throw xhal::common::utils::XHALXMLParserException(std::string("XHAL XML exception: can't find node") + regName);
}
}

Expand Down

0 comments on commit bea638d

Please sign in to comment.