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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user