From 8857e8c1a492467ff23bb533851a8b870b10f540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=20C=C5=93ur?= Date: Fri, 4 Nov 2022 00:42:42 +0800 Subject: [PATCH] Declare TR_ETA_NOT_AVAIL as time_t (#4065) --- libtransmission/torrent.cc | 2 +- libtransmission/transmission.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/torrent.cc b/libtransmission/torrent.cc index 5ba4d3291..f71709f61 100644 --- a/libtransmission/torrent.cc +++ b/libtransmission/torrent.cc @@ -1134,7 +1134,7 @@ tr_stat const* tr_torrentStat(tr_torrent* tor) auto seed_idle_minutes = uint16_t{}; s->etaIdle = tor->etaSpeed_Bps < 1 && tr_torrentGetSeedIdle(tor, &seed_idle_minutes) ? seed_idle_minutes * 60 - s->idleSecs : - static_cast(TR_ETA_NOT_AVAIL); + TR_ETA_NOT_AVAIL; } break; diff --git a/libtransmission/transmission.h b/libtransmission/transmission.h index 8cd47938f..14635e6ea 100644 --- a/libtransmission/transmission.h +++ b/libtransmission/transmission.h @@ -1489,7 +1489,7 @@ enum TR_PEER_FROM_LTEP, /* peer address provided in an LTEP handshake */ TR_PEER_FROM__MAX }; -enum +enum tr_eta : time_t { TR_ETA_NOT_AVAIL = -1, TR_ETA_UNKNOWN = -2,