Commit 806912b5 authored by Ben Boeckel's avatar Ben Boeckel

TestIncrementalOctreePointLocator: close file handles

Change-Id: I98c0548b968ad06d97373d89d0e375cd71a058c0
parent 529f85be
......@@ -1025,24 +1025,28 @@ int TestIncrementalOctreePointLocator( int argc, char * argv[] )
if (n != 1)
{
cerr << "IO error " << __FILE__ << ":" << __LINE__ << "\n";
fclose(pntsFile);
return 1;
}
n = fwrite( pLocPnts, sizeof( double ), nLocPnts * 3, pntsFile );
if (n != static_cast<size_t>(nLocPnts) * 3)
{
cerr << "IO error " << __FILE__ << ":" << __LINE__ << "\n";
fclose(pntsFile);
return 1;
}
n = fwrite( minDist2, sizeof( double ), nLocPnts, pntsFile );
if (n != static_cast<size_t>(nLocPnts))
{
cerr << "IO error " << __FILE__ << ":" << __LINE__ << "\n";
fclose(pntsFile);
return 1;
}
n = fwrite( maxDist2, sizeof( double ), nLocPnts, pntsFile );
if (n != static_cast<size_t>(nLocPnts))
{
cerr << "IO error " << __FILE__ << ":" << __LINE__ << "\n";
fclose(pntsFile);
return 1;
}
fclose( pntsFile ); pntsFile = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment