mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(trunk libT) minor cleanup: use symbolic name instead of magic numbers; use tr_bool instead of int
This commit is contained in:
parent
640c952ce8
commit
1c71e622e1
4 changed files with 5 additions and 9 deletions
|
@ -92,7 +92,7 @@ struct tr_peerIo
|
|||
tr_port port;
|
||||
int socket;
|
||||
|
||||
uint8_t peerId[20];
|
||||
uint8_t peerId[SHA_DIGEST_LENGTH];
|
||||
time_t timeCreated;
|
||||
|
||||
tr_session * session;
|
||||
|
|
|
@ -908,9 +908,7 @@ static void
|
|||
enqueueScrape( tr_session * session,
|
||||
tr_tracker * tracker )
|
||||
{
|
||||
struct tr_tracker_request * req;
|
||||
|
||||
req = createScrape( session, tracker );
|
||||
struct tr_tracker_request * req = createScrape( session, tracker );
|
||||
tr_runInEventThread( session, invokeRequest, req );
|
||||
}
|
||||
|
||||
|
@ -919,9 +917,7 @@ enqueueRequest( tr_session * session,
|
|||
tr_tracker * tracker,
|
||||
int reqtype )
|
||||
{
|
||||
struct tr_tracker_request * req;
|
||||
|
||||
req = createRequest( session, tracker, reqtype );
|
||||
struct tr_tracker_request * req = createRequest( session, tracker, reqtype );
|
||||
tr_runInEventThread( session, invokeRequest, req );
|
||||
}
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ tr_eventClose( tr_session * session )
|
|||
***
|
||||
**/
|
||||
|
||||
int
|
||||
tr_bool
|
||||
tr_amInEventThread( tr_session * session )
|
||||
{
|
||||
assert( session );
|
||||
|
|
|
@ -48,7 +48,7 @@ tr_timer* tr_timerNew( tr_session * handle,
|
|||
void tr_timerFree( tr_timer ** timer );
|
||||
|
||||
|
||||
int tr_amInEventThread( tr_session * );
|
||||
tr_bool tr_amInEventThread( tr_session * );
|
||||
|
||||
void tr_runInEventThread( tr_session * session,
|
||||
void func( void* ),
|
||||
|
|
Loading…
Reference in a new issue