[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Suspicous code in kdelibs-3.5.2
From: Michael Brade <brade () kde ! org>
Date: 2006-04-05 18:33:03
Message-ID: 200604052033.06052.brade () kde ! org
[Download RAW message or body]
On Wednesday 05 April 2006 19:16, Alexander Neundorf wrote:
> On Wednesday 05 April 2006 19:12, Michael Brade wrote:
> > On Wednesday 05 April 2006 16:26, Christoph Bartoschek wrote:
> > > -----------------------------------------------------------------
> > > Lines where boolean expressions are used in non-boolean contexts:
> > > -----------------------------------------------------------------
> > >
> > > - kio/kio/kdirlister.cpp:947
> > > - kio/kio/kdirlister.cpp:1524
> >
> > I don't quite understand... what's wrong with this:
> >
> > bool delayedMimeTypes = true;
> > for ( KDirLister *kdl = listers->first(); kdl; kdl = listers->next() )
> > delayedMimeTypes &= kdl->d->delayedMimeTypes;
>
> Not sure, isn't this the same as
> delayedMimeTypes = delayedMimeTypes & kdl->d->delayedMimeTypes;
> while you probably want
> delayedMimeTypes = delayedMimeTypes && kdl->d->delayedMimeTypes;
Yes, I guess so, but what is the difference if the operands are bool? Does it
matter that bool is maybe not one bit on actual implementations? I wouldn't
think so...
--
Michael Brade; KDE Developer, Student of Computer Science
|-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
°--web: http://www.kde.org/people/michaelb.html
KDE 4: Beyond Your Expectations
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic