* Fix a missing semi-colon r1395
* Change some calls to FREE(TRACK*) to free(TRACK*), because TRACK is always allocated using malloc * Change only one instance of MALLOC and only other instance of FREE in lib/sound/track.c to malloc and free respectively git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1396 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
dfa8d64f27
commit
61975a7936
|
@ -412,7 +412,7 @@ static TRACK* sound_ReadTrack( TRACK *psTrack, ov_callbacks callbackFuncs, void*
|
|||
|
||||
if (ov_open_callbacks(datasource, &ogg_stream, NULL, 0, callbackFuncs) < 0)
|
||||
{
|
||||
FREE(psTrack);
|
||||
free(psTrack);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -483,7 +483,7 @@ TRACK* sound_ReadTrackFromFile(TRACK *psTrack, char szFileName[])
|
|||
|
||||
if (fileHandle.fileHandle == NULL)
|
||||
{
|
||||
FREE(psTrack);
|
||||
free(psTrack);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ BOOL sound_Init( SDWORD iMaxSameSamples )
|
|||
}
|
||||
|
||||
// init audio array
|
||||
g_apTrack = (TRACK **) MALLOC( sizeof(TRACK* ) * MAX_TRACKS);
|
||||
g_apTrack = (TRACK **) malloc( sizeof(TRACK*) * MAX_TRACKS);
|
||||
for ( i = 0; i < MAX_TRACKS; i++ )
|
||||
{
|
||||
g_apTrack[i] = NULL;
|
||||
|
@ -89,7 +89,7 @@ BOOL sound_Init( SDWORD iMaxSameSamples )
|
|||
//
|
||||
BOOL sound_Shutdown( void )
|
||||
{
|
||||
FREE( g_apTrack );
|
||||
free( g_apTrack );
|
||||
|
||||
// set inactive flag to prevent callbacks coming after shutdown
|
||||
g_bSystemActive = FALSE;
|
||||
|
@ -229,17 +229,17 @@ TRACK* sound_LoadTrackFromFile(char *fileName)
|
|||
|
||||
pTrack->bMemBuffer = FALSE;
|
||||
|
||||
pTrack = sound_ReadTrackFromFile(pTrack, fileName)
|
||||
pTrack = sound_ReadTrackFromFile(pTrack, fileName);
|
||||
|
||||
if (pTrack == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (sound_AddTrack( pTrack ) == FALSE)
|
||||
if (!sound_AddTrack( pTrack ))
|
||||
{
|
||||
sound_FreeTrack(pTrack);
|
||||
FREE(pTrack);
|
||||
free(pTrack);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -263,7 +263,7 @@ void sound_ReleaseTrack( TRACK *psTrack )
|
|||
}
|
||||
|
||||
sound_FreeTrack( psTrack );
|
||||
FREE( psTrack );
|
||||
free( psTrack );
|
||||
}
|
||||
|
||||
//*
|
||||
|
|
Loading…
Reference in New Issue