[core] Fix android-cloexec-fopen warning

Detected by clang-tidy-8.
This commit is contained in:
Thiago Marcos P. Santos
2020-04-17 17:53:41 +03:00
parent fea8a83e7f
commit f82e375bc7

View File

@@ -15,7 +15,7 @@ IOException::IOException(int err, const std::string& msg)
}
void write_file(const std::string &filename, const std::string &data) {
FILE *fd = fopen(filename.c_str(), "wb");
FILE *fd = fopen(filename.c_str(), "wbe");
if (fd) {
fwrite(data.data(), sizeof(std::string::value_type), data.size(), fd);
fclose(fd);