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

Re: Patch - no parameters validation, overly complex code

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 21 Feb 2011 22:01:55 +0100

On 21.02.2011 07:55, Dmitry wrote:
> Hey.
>
> Attached is an untested patch that addresses the following issues:
> - pointers that are later dereferenced are not checked for being valid
> - "out" parameters are not set on control paths that return S_FALSE or S_OK
> - "class" with all public members is used instead of "struct"
> - overly complex code

Committed in r20905.

> Also there's a "switch(m_State)" that has no "default:" branch - what should happen there semantically? Should execution continue or should the code signal an error?

There are several such statements. But none of them really require a
default branch since the variable the non-default branches modify has
already been set to a default value.

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=2706328
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-02-21 22:02:25 CET

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.