coverity#735339 Unchecked return value from library
Change-Id: Ia6567cb6f779669c738469ba68b7ad675e99d71a
This commit is contained in:
@@ -172,7 +172,12 @@ bool FtFontFile::Map()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
struct stat aStat;
|
struct stat aStat;
|
||||||
fstat( nFile, &aStat );
|
int nRet = fstat( nFile, &aStat );
|
||||||
|
if (nRet < 0)
|
||||||
|
{
|
||||||
|
close (nFile);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
mnFileSize = aStat.st_size;
|
mnFileSize = aStat.st_size;
|
||||||
mpFileMap = (const unsigned char*)
|
mpFileMap = (const unsigned char*)
|
||||||
mmap( NULL, mnFileSize, PROT_READ, MAP_SHARED, nFile, 0 );
|
mmap( NULL, mnFileSize, PROT_READ, MAP_SHARED, nFile, 0 );
|
||||||
|
Reference in New Issue
Block a user