]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a likely bug found by coverity in test_scheduler.c.
authorNick Mathewson <nickm@torproject.org>
Fri, 28 Nov 2014 04:21:46 +0000 (23:21 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 28 Nov 2014 04:21:46 +0000 (23:21 -0500)
Andrea, do you agree with this?

This is CID 1256186

src/test/test_scheduler.c

index da5c4e8fa090db7e85df1b4cd631f97284dec283..d031214f419c45a5fbe3a5b9cfe3d07c048bfa69 100644 (file)
@@ -258,7 +258,7 @@ circuitmux_compare_muxes_mock(circuitmux_t *cmux_1,
     else if (cmux_1 == mock_ccm_tgt_2 && cmux_2 == mock_ccm_tgt_1) {
       result = 1;
     } else {
-      if (cmux_1 == mock_ccm_tgt_1 || cmux_1 == mock_ccm_tgt_1) result = -1;
+      if (cmux_1 == mock_ccm_tgt_1 || cmux_1 == mock_ccm_tgt_2) result = -1;
       else if (cmux_2 == mock_ccm_tgt_1 || cmux_2 == mock_ccm_tgt_2) {
         result = 1;
       } else {