Review Request: Avoid possible null pointer dereferences in khtml

Thiago Macieira thiago at
Fri Oct 7 17:30:59 BST 2011

On Friday, 7 de October de 2011 15:49:59 Ruurd Pels wrote:
> > On Oct. 7, 2011, 2:35 p.m., Ruurd Pels wrote:
> > > Revert the whitespace changes with git. Other than that I dislike
> > > multiple exit points even in trivially short functions. It really does
> > > not hurt to create a local variable holding the result of the function
> > > and then return that as the result of a function. Another pet-peeve is
> > > negative tests, for example ... if ( !xxx->isEmpty() ) ... and would
> > > prefer conditions always yielding true, for example if ( xxx->isEmpty()
> > > == false) ) instead.> 
> > Christoph Feck wrote:
> >     If you read the "!isEmpty" as "is not Empty", the first version sounds
> >     clearer, natural, and easier to understand than the second version.
> Free after my fellow countryman Edsger Dijkstra: Negate considered harmful.
> It is easy to overlook the !-operator and negative tests require an extra
> mental step to be able to follow the logic. And yes it is a pet peeve.

That may be, but there's nothing in the style guide asking for this change. 
I'd say it's optional if the author wants to do them.

Thiago Macieira - thiago (AT) - thiago (AT)
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list