mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
inline tr_removeElementFromArray()
This commit is contained in:
@@ -1406,18 +1406,3 @@ tr_moveFile( const char * oldpath, const char * newpath, tr_bool * renamed )
|
||||
unlink( oldpath );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***
|
||||
****
|
||||
***/
|
||||
|
||||
void
|
||||
tr_removeElementFromArray( void * array, int index_to_remove,
|
||||
size_t sizeof_element, size_t nmemb )
|
||||
{
|
||||
char * a = array;
|
||||
|
||||
memmove( a + sizeof_element * index_to_remove,
|
||||
a + sizeof_element * ( index_to_remove + 1 ),
|
||||
sizeof_element * ( --nmemb - index_to_remove ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user