msvcirt: Avoid superfluous comparison in some compilers
Henri Verbeet
hverbeet at gmail.com
Sun Mar 27 17:30:41 CDT 2016
On 27 March 2016 at 13:57, Iván Matellanes <matellanesivan at gmail.com> wrote:
> - if (dir < SEEKDIR_beg || dir > SEEKDIR_end || !(mode & (OPENMODE_in|OPENMODE_out)))
> + if ((dir != SEEKDIR_beg && dir != SEEKDIR_cur && dir != SEEKDIR_end) || !(mode & (OPENMODE_in|OPENMODE_out)))
I'm not sure you're really making it better by adding another
comparison. One alternative you may want to consider is just
"(unsigned int)dir > SEEKDIR_end".
More information about the wine-patches
mailing list