Suspicous code in kdelibs-3.5.2
Alexander Neundorf
neundorf at kde.org
Wed Apr 5 18:16:34 BST 2006
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;
?
Alex
--
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org - http://www.kde.org
alex AT neundorf.net - http://www.neundorf.net
More information about the kde-core-devel
mailing list