1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-23 14:40:43 +00:00

refactor: make tr_info.errorString a const char*. ()

this field now points to tr_torrent.errorString instead of copying into
a standalone char array.

old: sizeof(tr_torrent) 2640
new: sizeof(tr_torrent) 2136
This commit is contained in:
Charles Kerr 2021-10-05 12:23:07 -05:00 committed by GitHub
parent 976fec6e94
commit 6b7f2f9e53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1287,7 +1287,7 @@ tr_stat const* tr_torrentStat(tr_torrent* tor)
s->queuePosition = tor->queuePosition;
s->idleSecs = torrentGetIdleSecs(tor, s->activity);
s->isStalled = tr_torrentIsStalled(tor, s->idleSecs);
tr_strlcpy(s->errorString, tor->errorString, sizeof(s->errorString));
s->errorString = tor->errorString;
s->manualAnnounceTime = tr_announcerNextManualAnnounce(tor);
s->peersConnected = swarm_stats.peerCount;

View file

@ -1703,7 +1703,7 @@ typedef struct tr_stat
/** A warning or error message regarding the torrent.
@see error */
char errorString[512];
char const* errorString;
/** When tr_stat.activity is TR_STATUS_CHECK or TR_STATUS_CHECK_WAIT,
this is the percentage of how much of the files has been