Explicitly compare result of str(n)cmp/memcmp to signify that it's not boolean

This commit is contained in:
Mike Gelfand
2016-03-13 22:11:01 +00:00
parent 91f8ceb20d
commit c955c04d8f
40 changed files with 298 additions and 298 deletions

View File

@@ -290,11 +290,11 @@ tr_main (int argc,
{
tr_ctorSetMetainfo (ctor, fileContents, fileLength);
}
else if (!memcmp (torrentPath, "magnet:?", 8))
else if (memcmp (torrentPath, "magnet:?", 8) == 0)
{
tr_ctorSetMetainfoFromMagnetLink (ctor, torrentPath);
}
else if (!memcmp (torrentPath, "http", 4))
else if (memcmp (torrentPath, "http", 4) == 0)
{
tr_webRun (h, torrentPath, onTorrentFileDownloaded, ctor);
waitingOnWeb = true;