Skip to content

Commit

Permalink
Fix formatting i ncpl_vsil.cpp.
Browse files Browse the repository at this point in the history
Code review by Pete Klier of Google.


git-svn-id: https://svn.osgeo.org/gdal/trunk@36984 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
schwehr committed Dec 21, 2016
1 parent 89c7cf2 commit 0bfa8d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gdal/port/cpl_vsil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,8 +1355,8 @@ int VSIIngestFile( VSILFILE* fp,
VSIFReadL( *ppabyRet + nDataLen, 1, 8192, fp ) );
nDataLen += nRead;

if( nMaxSize >= 0 && nDataLen >
static_cast<vsi_l_offset>(nMaxSize) )
if( nMaxSize >= 0 &&
nDataLen > static_cast<vsi_l_offset>(nMaxSize) )
{
CPLError( CE_Failure, CPLE_AppDefined,
"Input file too large to be opened" );
Expand Down Expand Up @@ -1388,9 +1388,9 @@ int VSIIngestFile( VSILFILE* fp,

// With "large" VSI I/O API we can read data chunks larger than
// VSIMalloc could allocate. Catch it here.
if( nDataLen >
static_cast<vsi_l_offset>(static_cast<size_t>(nDataLen)) ||
(nMaxSize >= 0 && nDataLen > static_cast<vsi_l_offset>(nMaxSize)) )
if( nDataLen > static_cast<vsi_l_offset>(static_cast<size_t>(nDataLen))
|| (nMaxSize >= 0 &&
nDataLen > static_cast<vsi_l_offset>(nMaxSize)) )
{
CPLError( CE_Failure, CPLE_AppDefined,
"Input file too large to be opened" );
Expand Down

0 comments on commit 0bfa8d5

Please sign in to comment.