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

Suspicious error handling code

From: Dmitry <wipedout_at_yandex.ru>
Date: Thu, 28 Jul 2011 18:35:36 +0400

Hey.

Currently SubWCRev::GetWCInfo() reads:

if (wcPath==NULL)
        return ERROR_INVALID_PARAMETER;

The problem is ERROR_INVALID_PARAMETER is defined as numeric constant 77 in WinAPI headers, so SUCCEEDED will evaluate to "true" on this value and any well-obeying caller will think the output parameters have been set. I suspect it should be E_INVALIDARG instead.

Best wishes.
Dmitry.

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-07-28 16:35:42 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.