Re: [libvirt] [PATCH 04/18] cpu: Use a different name for the copy in ppc64ModelFromCPU()

2015-08-05 Thread Andrea Bolognani
On Wed, 2015-08-05 at 14:28 +0200, Jiri Denemark wrote: > > You forgot to initialize copy to NULL, but why not just > > return ppc64ModelCopy(model); > > and removing "copy" end the error label completely since it will > never > do anything anyway? You're right! Done :) Cheers. -- Andre

Re: [libvirt] [PATCH 04/18] cpu: Use a different name for the copy in ppc64ModelFromCPU()

2015-08-05 Thread Jiri Denemark
On Tue, Aug 04, 2015 at 11:37:55 +0200, Andrea Bolognani wrote: > While the previous code was correct, it looked wrong at first > sight because the same variable used to store the result of a > map lookup is later used to store a copy of said result. The > copy is deallocated on error, but due to t

[libvirt] [PATCH 04/18] cpu: Use a different name for the copy in ppc64ModelFromCPU()

2015-08-04 Thread Andrea Bolognani
While the previous code was correct, it looked wrong at first sight because the same variable used to store the result of a map lookup is later used to store a copy of said result. The copy is deallocated on error, but due to the fact that a single variable is used, it looks like the result of the