From 58209af347a05e63c7e6467fbb22a889ecbcc20f Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 8 Jan 2007 15:18:05 +0000 Subject: [PATCH] small improvement --- libtransmission/clients.c | 2 +- macosx/Torrent.m | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/libtransmission/clients.c b/libtransmission/clients.c index 28217294c..1ea4cc780 100644 --- a/libtransmission/clients.c +++ b/libtransmission/clients.c @@ -209,7 +209,7 @@ char * tr_clientForId( uint8_t * id ) } else if( !memcmp( id, "AZ", 2 ) && !memcmp( &id[6], "BT", 2 ) ) { - asprintf( &ret, "BitTyrant (%c.%c.%c.%c)", + asprintf( &ret, "BitTyrant %c.%c.%c.%c", id[2], id[3], id[4], id[5] ); } else if( !memcmp( id, "-FG", 3 ) ) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 9a05a8a94..feff4d0eb 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -595,16 +595,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 - (void) updateSpeedSetting { - if (fLimitCustom) - { - tr_setUploadLimit(fHandle, fCheckUpload ? fUploadLimit : -1); - tr_setDownloadLimit(fHandle, fCheckDownload ? fDownloadLimit : -1); - } - else - { - tr_setUploadLimit(fHandle, -1); - tr_setDownloadLimit(fHandle, -1); - } + tr_setUploadLimit(fHandle, fLimitCustom && fCheckUpload ? fUploadLimit : -1); + tr_setDownloadLimit(fHandle, fLimitCustom && fCheckDownload ? fDownloadLimit : -1); } - (void) setWaitToStart: (BOOL) wait