[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: msvcirt: Avoid superfluous comparison in some compilers
From:       Iván_Matellanes <matellanesivan () gmail ! com>
Date:       2016-03-28 10:18:10
Message-ID: 56F904E2.1050403 () gmail ! com
[Download RAW message or body]

On 27/03/16 23:30, Henri Verbeet wrote:
> On 27 March 2016 at 13:57, Iván Matellanes <matellanesivan@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".
Yes, a cast should do the trick, I will resend. Thanks.
Iván


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic