[1] Review comments handled

This commit is contained in:
ANSHUMAN TRIPATHY 2019-08-07 10:21:31 +05:30
parent 7375586f21
commit 447c1420b8

View File

@ -34,6 +34,7 @@ namespace tflite {
FileCopyAllocation::FileCopyAllocation(const char* filename,
ErrorReporter* error_reporter)
: Allocation(error_reporter, Allocation::Type::kFileCopy) {
// Obtain the file size using fstat, or report an error if that fails.
std::unique_ptr<FILE, decltype(&fclose)> file(fopen(filename, "rb"), fclose);
if (!file) {
error_reporter_->Report("Could not open '%s'.", filename);