update main-with-bazel from master branch

This commit is contained in:
BoringSSL Robot
2023-08-22 22:54:10 +00:00
+5 -2
View File
@@ -75,8 +75,11 @@ bool SettingsWriter::Commit() {
}
bssl::UniquePtr<uint8_t> free_settings(settings);
using ScopedFILE = std::unique_ptr<FILE, decltype(&fclose)>;
ScopedFILE file(fopen(path_.c_str(), "w"), fclose);
struct FileCloser {
void operator()(FILE *f) const { fclose(f); }
};
using ScopedFILE = std::unique_ptr<FILE, FileCloser>;
ScopedFILE file(fopen(path_.c_str(), "w"));
if (!file) {
return false;
}