FW: shell32: SHChangeNotify is really Unicode/ANSI indifferent, take2

Rolf Kalbermatter r.kalbermatter at hccnet.nl
Tue Jan 21 01:49:35 CST 2003


> -----Original Message-----
> From: Dmitry Timoshkov [mailto:dmitry at baikal.ru]
> Sent: Tuesday, January 21, 2003 7:04 AM
> To: Francois Gouget; Rolf Kalbermatter
> Cc: wine-devel at winehq.com
> Subject: Re: FW: shell32: SHChangeNotify is really 
> Unicode/ANSI indifferent, take2
> 
> 
> "Francois Gouget" <fgouget at free.fr> wrote:
> 
> > On Tue, 21 Jan 2003, Rolf Kalbermatter wrote:
> > [...]
> > > @@ -289,22 +257,11 @@
> > >  LeaveCriticalSection(&SHELL32_ChangenotifyCS);
> > >
> > >  /* if we allocated it, free it */
> > > - if(uFlags & SHCNF_PATHA)
> > > + if (uFlags & SHCNF_PATHA || uFlags & SHCNF_PATHW)
> > >  {
> > 
> > Just nitpicking (since Dimitrie is on vacation ;-): it's 
> probably not
> > necessary but I would be more confortable if the above test had more
> > parentheses:
> > 
> > > +     if ((uFlags & SHCNF_PATHA) || (uFlags & SHCNF_PATHW))
> 
> or even better form the effectiveness point of view:
> 
> if (uFlags & (SHCNF_PATHA | SHCNF_PATHW))

Well, because of the values of the SHCNF constants

if (uFlags & (SHCNF_PATHA | SHCNF_PATHW))

really is equal to 

if (uFlags & SHCNF_PATHW)

but this one although correct looks highly unintuitive ;-).

Rolf Kalbermatter




More information about the wine-devel mailing list