1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

(trunk libT) remove dead code noticed by geirha

This commit is contained in:
Charles Kerr 2009-08-15 15:52:10 +00:00
parent 2388ef193d
commit 1c5b344c85
3 changed files with 1 additions and 31 deletions

View file

@ -477,21 +477,6 @@ tr_fdFileCheckout( int torrentId,
return o->fd;
}
void
tr_fdFileReturn( int fd )
{
struct tr_openfile * o;
const struct tr_openfile * end;
for( o=gFd->openFiles, end=o+gFd->openFileLimit; o!=end; ++o )
{
if( o->fd != fd )
continue;
dbgmsg( "releasing file \"%s\"", o->filename );
break;
}
}
void
tr_fdFileClose( const char * filename )
{

View file

@ -53,9 +53,7 @@ int64_t tr_lseek( int fd, int64_t offset, int whence );
*
* A small pool of open files is kept to avoid the overhead of
* continually opening and closing the same files when downloading
* piece data. It's also used to ensure only one caller can
* write to the file at a time. Callers check out a file, use it,
* and then check it back in via tr_fdFileReturn() when done.
* piece data.
*
* - if `folder' doesn't exist, errno is set to ENOENT.
* - if doWrite is true, subfolders in torrentFile are created if necessary.
@ -64,7 +62,6 @@ int64_t tr_lseek( int fd, int64_t offset, int whence );
* on success, a file descriptor >= 0 is returned.
* on failure, a -1 is returned and errno is set.
*
* @see tr_fdFileReturn
* @see tr_fdFileClose
*/
int tr_fdFileCheckout( int torrentId,
@ -74,14 +71,6 @@ int tr_fdFileCheckout( int torrentId,
tr_preallocation_mode preallocationMode,
uint64_t desiredFileSize );
/**
* Returns an fd from tr_fdFileCheckout() so that other clients may borrow it.
*
* @see tr_fdFileCheckout
* @see tr_fdFileClose
*/
void tr_fdFileReturn( int file );
/**
* Closes a file that's being held by our file repository.
*
@ -89,7 +78,6 @@ void tr_fdFileReturn( int file );
* If the file is currently checked out, it will be closed upon its return.
*
* @see tr_fdFileCheckout
* @see tr_fdFileReturn
*/
void tr_fdFileClose( const char * filename );

View file

@ -113,9 +113,6 @@ readOrWriteBytes( const tr_torrent * tor,
if( ( !err ) && ( !fileExists ) && ( ioMode == TR_IO_WRITE ) )
tr_statsFileCreated( tor->session );
if( fd >= 0 )
tr_fdFileReturn( fd );
return err;
}