Bug 1296164 (part 2) - Use [must_use] on nsIFile.open{NSPR,ANSI}FileDesc(). r=froydnj.

The patch also changes RemoteOpenFileChild::OpenNSPRFileDesc() so that it
cannot succeed with a null fd, so that checking just the return value is
sufficient.
This commit is contained in:
Nicholas Nethercote
2016-08-18 15:27:16 +10:00
parent ee63ad186f
commit 06fac846a5
6 changed files with 21 additions and 15 deletions

View File

@@ -45,7 +45,6 @@ nsGZFileWriter::Init(nsIFile* aFile)
FILE* file;
nsresult rv = aFile->OpenANSIFileDesc(mMode == Create ? "wb" : "ab", &file);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}