From 7b25d0476c8b4b4e5f7bf6c62337b675ee7266b9 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 6 May 2008 20:31:05 +0000 Subject: [PATCH] remove occurrences of "if( 1 )" --- libtransmission/fastresume.c | 2 +- libtransmission/makemeta.c | 4 ++-- libtransmission/peer-mgr.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libtransmission/fastresume.c b/libtransmission/fastresume.c index a3ad10c73..66f853e71 100644 --- a/libtransmission/fastresume.c +++ b/libtransmission/fastresume.c @@ -207,7 +207,7 @@ tr_fastResumeSave( const tr_torrent * tor ) } /* Write progress data */ - if (1) { + { int i, n; tr_time_t * mtimes; uint8_t * buf = malloc( FR_PROGRESS_LEN( tor ) ); diff --git a/libtransmission/makemeta.c b/libtransmission/makemeta.c index 1f84af543..a1a3751d1 100644 --- a/libtransmission/makemeta.c +++ b/libtransmission/makemeta.c @@ -114,7 +114,7 @@ tr_metaInfoBuilderCreate( tr_handle * handle, const char * topFile ) tr_metainfo_builder * ret = tr_new0( tr_metainfo_builder, 1 ); ret->top = tr_strdup( topFile ); ret->handle = handle; - if (1) { + { struct stat sb; stat( topFile, &sb ); ret->isSingleFile = !S_ISDIR( sb.st_mode ); @@ -122,7 +122,7 @@ tr_metaInfoBuilderCreate( tr_handle * handle, const char * topFile ) /* build a list of files containing topFile and, if it's a directory, all of its children */ - if (1) { + { char *dir, *base; char dirbuf[MAX_PATH_LENGTH]; char basebuf[MAX_PATH_LENGTH]; diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 359948ddc..182379c35 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -1749,7 +1749,7 @@ shouldPeerBeClosed( const Torrent * t, const tr_peer * peer, int peerCount ) /* disconnect if it's been too long since piece data has been transferred. * this is on a sliding scale based on number of available peers... */ - if( 1 ) { + { const int relaxStrictnessIfFewerThanN = (int)((getMaxPeerCount(tor) * 0.9) + 0.5); /* if we have >= relaxIfFewerThan, strictness is 100%. * if we have zero connections, strictness is 0% */ -- 2.40.0