mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
move file->close() into the if() clause. b=382508, r=luser
This commit is contained in:
parent
bc0dcb7bfc
commit
ec0b4e8a36
@ -155,9 +155,9 @@ bool ReadStringsFromFile(const string& path,
|
||||
bool success = false;
|
||||
if (f->is_open()) {
|
||||
success = ReadStrings(*f, strings, unescape);
|
||||
f->close();
|
||||
}
|
||||
|
||||
f->close();
|
||||
delete f;
|
||||
return success;
|
||||
}
|
||||
@ -192,9 +192,9 @@ bool WriteStringsToFile(const string& path,
|
||||
bool success = false;
|
||||
if (f->is_open()) {
|
||||
success = WriteStrings(*f, header, strings, escape);
|
||||
f->close();
|
||||
}
|
||||
|
||||
f->close();
|
||||
delete f;
|
||||
return success;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user