refactor: change tr_torrentNew() args (#2337)

This commit is contained in:
Charles Kerr
2021-12-24 16:05:17 -06:00
committed by GitHub
parent f3228e9670
commit b058daff4b
13 changed files with 30 additions and 62 deletions

View File

@@ -233,11 +233,9 @@ static tr_watchdir_status onFileAdded(tr_watchdir_t dir, char const* name, void*
if (err == 0)
{
tr_torrentNew(ctor, &err, nullptr);
if (err == TR_PARSE_ERR)
if (tr_torrentNew(ctor, nullptr) == nullptr)
{
tr_logAddError("Error parsing .torrent file \"%s\"", name);
tr_logAddError("Unable to add .torrent file \"%s\"", name);
}
else
{