From 10cdd7f790eed859ad333a6a7635a2d6a2d53447 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Sun, 14 Jul 2019 15:40:41 +0300 Subject: [PATCH] Use explicit boolean conversions --- cli/cli.c | 38 ++--- daemon/daemon.c | 88 ++++++------ gtk/tr-core.c | 2 +- libtransmission/announcer.c | 2 +- libtransmission/bitfield.c | 2 +- libtransmission/completion.c | 2 +- libtransmission/crypto-utils-openssl.c | 2 +- libtransmission/fdlimit.c | 2 +- libtransmission/file-posix.c | 16 +-- libtransmission/handshake.c | 4 +- libtransmission/list.c | 2 +- libtransmission/log.c | 4 +- libtransmission/makemeta.c | 2 +- libtransmission/peer-io.c | 2 +- libtransmission/peer-mgr.c | 12 +- libtransmission/peer-msgs.c | 34 ++--- libtransmission/peer-msgs.h | 2 +- libtransmission/resume.c | 6 +- libtransmission/rpcimpl.c | 8 +- libtransmission/session.c | 4 +- libtransmission/stats.c | 2 +- libtransmission/subprocess-posix.c | 2 +- libtransmission/torrent-ctor.c | 2 +- libtransmission/torrent-magnet.c | 2 +- libtransmission/torrent.c | 14 +- libtransmission/tr-dht.c | 8 +- libtransmission/tr-getopt-test.c | 16 +-- libtransmission/tr-getopt.c | 2 +- libtransmission/tr-getopt.h | 2 +- libtransmission/transmission.h | 6 +- libtransmission/upnp.c | 2 +- libtransmission/utils.c | 2 +- libtransmission/variant.c | 2 +- libtransmission/webseed.c | 4 +- qt/Application.cc | 16 +-- qt/MainWindow.cc | 2 +- utils/create.c | 14 +- utils/edit.c | 10 +- utils/remote.c | 183 +++++++++++++------------ utils/show.c | 10 +- 40 files changed, 268 insertions(+), 267 deletions(-) diff --git a/cli/cli.c b/cli/cli.c index 92cd8db91..d53aa98e7 100644 --- a/cli/cli.c +++ b/cli/cli.c @@ -75,25 +75,25 @@ static char const* torrentPath = NULL; static struct tr_option const options[] = { - { 'b', "blocklist", "Enable peer blocklists", "b", 0, NULL }, - { 'B', "no-blocklist", "Disable peer blocklists", "B", 0, NULL }, - { 'd', "downlimit", "Set max download speed in "SPEED_K_STR, "d", 1, "" }, - { 'D', "no-downlimit", "Don't limit the download speed", "D", 0, NULL }, - { 910, "encryption-required", "Encrypt all peer connections", "er", 0, NULL }, - { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL }, - { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL }, - { 'f', "finish", "Run a script when the torrent finishes", "f", 1, "