Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-08 Thread Jim Meyering
Daniel Veillard wrote: ... However, the point is still valid, so I'll wait for confirmation. This is still about defensive coding, i.e., ensuring that maintenance doesn't violate invariants in harder-to-diagnose ways. If you get a bug report, which would you rather hear? libvirt sometimes

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-08 Thread Jim Meyering
Daniel P. Berrange wrote: On Thu, Jan 07, 2010 at 11:03:23AM +0100, Daniel Veillard wrote: On Thu, Jan 07, 2010 at 09:37:57AM +0100, Jim Meyering wrote: However, the point is still valid, so I'll wait for confirmation. This is still about defensive coding, i.e., ensuring that

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-08 Thread Daniel Veillard
On Fri, Jan 08, 2010 at 12:13:24PM +0100, Jim Meyering wrote: Daniel Veillard wrote: ... However, the point is still valid, so I'll wait for confirmation. This is still about defensive coding, i.e., ensuring that maintenance doesn't violate invariants in harder-to-diagnose ways. If you

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-07 Thread Daniel P. Berrange
On Wed, Jan 06, 2010 at 09:55:23PM +0100, Jim Meyering wrote: Daniel Veillard wrote: On Wed, Jan 06, 2010 at 12:46:11PM +0100, Jim Meyering wrote: As the log says, once we've dereferenced it, there's no point in comparing to NULL. From 463eaf1027a154e71839a67eca85b3ada8b817ff Mon Sep

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-07 Thread Jim Meyering
Daniel P. Berrange wrote: On Wed, Jan 06, 2010 at 09:55:23PM +0100, Jim Meyering wrote: Daniel Veillard wrote: On Wed, Jan 06, 2010 at 12:46:11PM +0100, Jim Meyering wrote: As the log says, once we've dereferenced it, there's no point in comparing to NULL. From

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-07 Thread Daniel Veillard
On Thu, Jan 07, 2010 at 09:37:57AM +0100, Jim Meyering wrote: Daniel P. Berrange wrote: Considering that this is in the daemon and that bad things have been known to happen via NULL derefs, some would argue that an assertion failure is preferable. No, this code is the client side of the

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-07 Thread Daniel P. Berrange
On Thu, Jan 07, 2010 at 11:03:23AM +0100, Daniel Veillard wrote: On Thu, Jan 07, 2010 at 09:37:57AM +0100, Jim Meyering wrote: However, the point is still valid, so I'll wait for confirmation. This is still about defensive coding, i.e., ensuring that maintenance doesn't violate

[libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-06 Thread Jim Meyering
As the log says, once we've dereferenced it, there's no point in comparing to NULL. From 463eaf1027a154e71839a67eca85b3ada8b817ff Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Wed, 6 Jan 2010 12:45:07 +0100 Subject: [PATCH] don't test res == NULL after we've already

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-06 Thread Daniel Veillard
On Wed, Jan 06, 2010 at 12:46:11PM +0100, Jim Meyering wrote: As the log says, once we've dereferenced it, there's no point in comparing to NULL. From 463eaf1027a154e71839a67eca85b3ada8b817ff Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Wed, 6 Jan 2010 12:45:07

Re: [libvirt] [PATCH] don't test res == NULL after we've already dereferenced it

2010-01-06 Thread Jim Meyering
Daniel Veillard wrote: On Wed, Jan 06, 2010 at 12:46:11PM +0100, Jim Meyering wrote: As the log says, once we've dereferenced it, there's no point in comparing to NULL. From 463eaf1027a154e71839a67eca85b3ada8b817ff Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Wed,