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

Suspicious logical expression

From: Dmitry <wipedout_at_yandex.ru>
Date: Wed, 29 Jun 2011 11:25:24 +0400

Hey.

Currently TortoiseBlame::SetupLexer() reads

    if (lineptr)
    {
        _tcscpy_s(line, lineptr+1);
        _tcslwr_s(line);
        if ((_tcscmp(line, _T("py"))==0)||
            (_tcscmp(line, _T("pyw"))==0)||
            (_tcscmp(line, _T("pyw"))==0))

the inner if performs the very same check twice in a row. Perhaps the second check is unneeded or mistyped. This defect was detected using PVS-Studio static analysis tool.

Best wishes.
Dmitry.

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-06-29 09:25:32 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.