filesystem: replace same struct type memcpys by assignments
This commit is contained in:
parent
f6fa085fe4
commit
274f9d5846
2 changed files with 3 additions and 3 deletions
|
@ -531,9 +531,9 @@ extern "C" void EXPORT *CreateInterface( const char *interface, int *retval )
|
||||||
|
|
||||||
if( !Q_strcmp( interface, FS_API_CREATEINTERFACE_TAG ))
|
if( !Q_strcmp( interface, FS_API_CREATEINTERFACE_TAG ))
|
||||||
{
|
{
|
||||||
static fs_api_t copy = { 0 }; // return a copy, to disallow overriding
|
static fs_api_t copy; // return a copy, to disallow overriding
|
||||||
|
|
||||||
memcpy( ©, &g_api, sizeof( copy ));
|
copy = g_api;
|
||||||
|
|
||||||
if( retval )
|
if( retval )
|
||||||
*retval = 0;
|
*retval = 0;
|
||||||
|
|
|
@ -3078,7 +3078,7 @@ int EXPORT GetFSAPI( int version, fs_api_t *api, fs_globals_t **globals, fs_inte
|
||||||
if( engfuncs && !FS_InitInterface( version, engfuncs ))
|
if( engfuncs && !FS_InitInterface( version, engfuncs ))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
memcpy( api, &g_api, sizeof( *api ));
|
*api = g_api;
|
||||||
*globals = &FI;
|
*globals = &FI;
|
||||||
|
|
||||||
return FS_API_VERSION;
|
return FS_API_VERSION;
|
||||||
|
|
Loading…
Add table
Reference in a new issue