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

Re: Suspicious logical expression

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 29 Jun 2011 20:09:31 +0200

On 29.06.2011 09:25, Dmitry wrote:
> 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.

Fixed in r21634.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2780563
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-06-29 20:09:41 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.