2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[3874] Fixed string type in open() functions.

This commit is contained in:
Marcin Siodelski
2015-11-17 22:07:00 +01:00
parent 45d78a3d84
commit 2a47967c6f
2 changed files with 3 additions and 3 deletions

View File

@@ -312,7 +312,7 @@ DUIDFactory::set(const std::vector<uint8_t>& duid_vector) {
if (isPersisted()) {
std::ofstream ofs;
try {
ofs.open(storage_location_, std::ofstream::out |
ofs.open(storage_location_.c_str(), std::ofstream::out |
std::ofstream::trunc);
if (!ofs.good()) {
isc_throw(InvalidOperation, "unable to open DUID file "
@@ -380,7 +380,7 @@ DUIDFactory::readFromFile() {
std::ostringstream duid_str;
if (isPersisted()) {
std::ifstream ifs;
ifs.open(storage_location_, std::ifstream::in);
ifs.open(storage_location_.c_str(), std::ifstream::in);
if (ifs.good()) {
std::string read_contents;
while (!ifs.eof() && ifs.good()) {

View File

@@ -167,7 +167,7 @@ DUIDFactoryTest::removeDefaultFile() const {
std::string
DUIDFactoryTest::readDefaultFile() const {
std::ifstream ifs;
ifs.open(absolutePath(DEFAULT_DUID_FILE), std::ifstream::in);
ifs.open(absolutePath(DEFAULT_DUID_FILE).c_str(), std::ifstream::in);
if (!ifs.good()) {
return (std::string());
}