Remove four useless checks in dlls/gdi32/enhmetafile.c (RESEND)

Alexandre Julliard julliard at winehq.org
Mon Nov 19 05:59:04 CST 2007


Gerald Pfeifer <gerald at pfeifer.com> writes:

> One of the really uncontested ones, I think. ;-)
>
> ---------- Forwarded message ----------
> From: Gerald Pfeifer <gerald at pfeifer.com>
> To:  <wine-patches at winehq.org>
> Date: Thu, 1 Nov 2007 16:10:03 +0100 (CET)
> Subject: Remove four useless checks in dlls/gdi32/enhmetafile.c
>
> The members of EMRCREATEDIBPATTERNBRUSHPT are of type DWORD, so
> comparing them for >= 0 is a noop which always evaluates to true.
>
> Gerald
>
> ChangeLog:
> Remove four unnecessary comparisions of DWORD variables for >= 0.

Validating the record is not unnecessary, it just needs to be done
correctly by checking for wraparounds etc.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list