[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: Dmitry <wipedout_at_yandex.ru>
Date: Tue, 22 Feb 2011 09:21:55 +0300


22.02.2011, 00:01, "Stefan Küng" <tortoisesvn_at_gmail.com>:
>>  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.
Okay, for example in CShellExt::GetOverlayInfo() the "default" branch will leave iconName empty and then this empty string will be passed into RegQueryValueEx. According to MSDN "If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any." - is that the required behavior here?

Best wishes.


To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-02-22 07:22:04 CET

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