From: Nick Mathewson Date: Fri, 28 Nov 2014 04:21:46 +0000 (-0500) Subject: Fix a likely bug found by coverity in test_scheduler.c. X-Git-Tag: tor-0.2.6.2-alpha~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49976fabc4457713347fe6d0c8e16939de852393;p=thirdparty%2Ftor.git Fix a likely bug found by coverity in test_scheduler.c. Andrea, do you agree with this? This is CID 1256186 --- diff --git a/src/test/test_scheduler.c b/src/test/test_scheduler.c index da5c4e8fa0..d031214f41 100644 --- a/src/test/test_scheduler.c +++ b/src/test/test_scheduler.c @@ -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 {