Don't compare file handles to NULL

João Eiras joao.eiras at
Thu Mar 8 15:11:37 CST 2007

Na , Alexandre Julliard <julliard at> escreveu:

> Francois Gouget <fgouget at> writes:
>> These are not false positives. Any file handle that is not
>> INVALID_HANDLE_VALUE must be closed with CloseHandle(). So these checks
>> should be against INVALID_HANDLE_VALUE, not NULL. In fact they may
>> possibly be removed altogether.
> Note that a valid file handle will never be NULL, so while these
> checks are wrong in theory, in practice it makes no difference.

Yes it does. INVALID_HANDLE_VALUE has value of -1. NULL is 0 in a x86  

More information about the wine-devel mailing list