refactor: remove assigned-but-unused tr_info.originalName (#2276)

This commit is contained in:
Charles Kerr 2021-12-07 00:37:34 -06:00 committed by GitHub
parent 5096bbae9b
commit bfbca961d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 14 deletions

View File

@ -460,20 +460,13 @@ static char const* tr_metainfoParseImpl(
if (tr_variantDictFindStrView(d, TR_KEY_display_name, &sv))
{
tr_free(inf->name);
tr_free(inf->originalName);
inf->name = tr_strvDup(sv);
inf->originalName = tr_strvDup(sv);
}
if (inf->name == nullptr)
{
inf->name = tr_strdup(inf->hashString);
}
if (inf->originalName == nullptr)
{
inf->originalName = tr_strdup(inf->hashString);
}
}
else // not a magnet link and has no info dict...
{
@ -510,9 +503,7 @@ static char const* tr_metainfoParseImpl(
}
tr_free(inf->name);
tr_free(inf->originalName);
inf->name = tr_utf8clean(sv);
inf->originalName = tr_strdup(inf->name);
}
/* comment */
@ -655,7 +646,6 @@ void tr_metainfoFree(tr_info* inf)
tr_free(inf->creator);
tr_free(inf->source);
tr_free(inf->torrent);
tr_free(inf->originalName);
tr_free(inf->name);
for (unsigned int i = 0; i < inf->trackerCount; i++)

View File

@ -1589,10 +1589,6 @@ struct tr_info
/* total size of the torrent, in bytes */
uint64_t totalSize;
/* The original name that came in this torrent's metainfo.
* CLIENT CODE: NOT USE THIS FIELD. */
char* originalName;
/* The torrent's name. */
char* name;