MCPcopy Create free account
hub / github.com/avast/retdec / LoadFile

Method LoadFile

deps/tinyxml2/tinyxml2.cpp:2237–2254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2235
2236
2237XMLError XMLDocument::LoadFile( const char* filename )
2238{
2239 if ( !filename ) {
2240 TIXMLASSERT( false );
2241 SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=<null>" );
2242 return _errorID;
2243 }
2244
2245 Clear();
2246 FILE* fp = callfopen( filename, "rb" );
2247 if ( !fp ) {
2248 SetError( XML_ERROR_FILE_NOT_FOUND, 0, "filename=%s", filename );
2249 return _errorID;
2250 }
2251 LoadFile( fp );
2252 fclose( fp );
2253 return _errorID;
2254}
2255
2256// This is likely overengineered template art to have a check that unsigned long value incremented
2257// by one still fits into size_t. If size_t type is larger than unsigned long type

Callers

nothing calls this directly

Calls 2

callfopenFunction · 0.85
ClearFunction · 0.50

Tested by

no test coverage detected