Add TRACEs to NtCreateFile returns (second try)
Markus Hitter
mah at jump-ing.de
Mon Aug 25 14:29:53 CDT 2008
Am 25.08.2008 um 17:58 schrieb James Hawkins:
> On Mon, Aug 25, 2008 at 3:12 AM, Markus Hitter <mah at jump-ing.de>
> wrote:
>>
>> Am 25.08.2008 um 01:31 schrieb James Hawkins:
>>
>>> 2008/8/24 Markus Hitter <mah at jump-ing.de>:
>>>
>>> - if (!attr || !attr->ObjectName) return
>>> STATUS_INVALID_PARAMETER;
>>> + if (!attr || !attr->ObjectName)
>>> + {
>>> + TRACE("returning STATUS_INVALID_PARAMETER\n");
>>> + return STATUS_INVALID_PARAMETER;
>>> + }
>
> If attr is NULL, you'll crash in the TRACE.
Pardon. If attr is NULL, the TRACE() isn't even reached.
As I obviously can't follow you how the additional TRACE() makes the
code more fragile, please go ahead and post a short sample code
showing how the above snippet is done right. Thanks.
Markus
P.S.: I took the freedom and extended your patch citation slightly.
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
More information about the wine-devel
mailing list