Don't compare file handles to NULL

Alexandre Julliard julliard at
Fri Mar 9 13:31:46 CST 2007

Michael Stefaniuc <mstefani at> writes:

> Ok, as there are no false positives i have improved the script a little;
> documented it on my Smatch page and added it to my daily Smatch run.
> If you know more functions that return a file_handle i can search for
> those too. At the moment i'm looking only for the regexp "CreateFile[AW]?".

Probably at least CreateNamedPipe, CreateMailslot and FindFirstFile
would be interesting to check.

The opposite check would be nice too, there are probably cases where a
call that returns a NULL handle on error is tested against

Alexandre Julliard
julliard at

More information about the wine-devel mailing list