(trunk libT) a very minor commit. remove trailing spaces from lines and other stuff like that

This commit is contained in:
Charles Kerr 2009-11-22 03:57:36 +00:00
parent 8f13af5040
commit 94a48c4c81
7 changed files with 11 additions and 17 deletions

View File

@ -101,7 +101,7 @@ readOrWriteBytes( tr_session * session,
const char * base;
tr_bool fileExists;
tr_preallocation_mode preallocationMode;
fileExists = tr_torrentFindFile2( tor, fileIndex, &base, &subpath );
if( !fileExists )

View File

@ -56,11 +56,11 @@ base32_to_sha1( uint8_t * out, const char * in, const int inlen )
{
int digit;
int lookup = in[i] - '0';
/* Skip chars outside the lookup table */
if( lookup<0 || lookup>=base32LookupLen )
continue;
/* If this digit is not in the table, ignore it */
digit = base32Lookup[lookup];
if( digit == 0xFF )
@ -80,7 +80,7 @@ base32_to_sha1( uint8_t * out, const char * in, const int inlen )
index = (index + 5) % 8;
out[offset] |= (digit >> index);
offset++;
if( offset >= outlen )
break;
out[offset] |= digit << (8 - index);

View File

@ -15,7 +15,7 @@
#include "transmission.h"
typedef struct
typedef struct tr_magnet_info
{
uint8_t hash[20];
char * displayName;

View File

@ -557,16 +557,16 @@ tr_peerMgrPeerIsSeed( const tr_torrent * tor,
*** REQUESTS
***
*** There are two data structures associated with managing block requests:
***
***
*** 1. Torrent::requests, an array of "struct block_request" which keeps
*** track of which blocks have been requested, and when, and by which peers.
*** This is list is used for (a) cancelling requests that have been pending
*** for too long and (b) avoiding duplicate requests before endgame.
***
***
*** 2. Torrent::pieces, an array of "struct weighted_piece" which lists the
*** pieces that we want to request. It's used to decide which pieces to
*** return next when tr_peerMgrGetBlockRequests() is called.
**/
**/
/**
*** struct block_request
@ -616,7 +616,7 @@ requestListSort( Torrent * t, int mode )
default: assert( 0 && "unhandled" );
}
//fprintf( stderr, "sorting requests by %s\n", (mode==REQ_SORTED_BY_BLOCK)?"block":"time" );
//fprintf( stderr, "sorting requests by %s\n", (mode==REQ_SORTED_BY_BLOCK)?"block":"time" );
qsort( t->requests, t->requestCount,
sizeof( struct block_request ), compar );
}
@ -1399,7 +1399,7 @@ peerCallbackFunc( void * vpeer, void * vevent, void * vt )
tordbg( t, "setting %s doPurge flag because we got an ERANGE, EMSGSIZE, or ENOTCONN error",
tr_atomAddrStr( peer->atom ) );
}
else
else
{
tordbg( t, "unhandled error: %s", tr_strerror( e->err ) );
}

View File

@ -691,11 +691,6 @@ tr_sessionInitImpl( void * vdata )
session->web = tr_webInit( session );
--session->waiting;
///cccc
//initBlocklist
// session->rpcServer = tr_rpcInit( session, settings );
tr_sessionSet( session, &settings );
if( session->isDHTEnabled )

View File

@ -260,7 +260,6 @@ test_lowerbound( void )
#endif
check( pos == expected_pos[i-1] )
check( exact == expected_exact[i-1] )
}
return 0;

View File

@ -110,7 +110,7 @@ makeURL( tr_webseed * w,
/* if url ends with a '/', add the torrent name */
if( url[url_len - 1] == '/' && file->name )
tr_http_escape( out, file->name, strlen(file->name), 1 );
ret = tr_strndup( EVBUFFER_DATA( out ), EVBUFFER_LENGTH( out ) );
evbuffer_free( out );
return ret;