[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Suspicious conditional

From: Dmitry <wipedout_at_yandex.ru>
Date: Tue, 05 Jul 2011 13:57:52 +0400

Hey.

Currently CSVNProgressDlg::OnContextMenu() contains the following code:

            if ((data->action == svn_wc_notify_add)||
                (data->action == svn_wc_notify_update_add)||
                (data->action == svn_wc_notify_commit_added)||
                (data->action == svn_wc_notify_commit_modified)||
                (data->action == svn_wc_notify_restore)||
                (data->action == svn_wc_notify_revert)||
                (data->action == svn_wc_notify_resolved)||
                (data->action == svn_wc_notify_commit_replaced)||
                (data->action == svn_wc_notify_commit_modified)||
                (data->action == svn_wc_notify_commit_postfix_txdelta)||
                (data->action == svn_wc_notify_update_update))

here (data->action == svn_wc_notify_commit_modified) condition is checked twice. Either the second occurence is unneeded or it is mistyped. This defect was detected using PVS-Studio static analysis tool.

Best wishes.
Dmitry.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2784937

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-07-05 11:57:58 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.