On Mon, Apr 8, 2013 at 4:32 PM, Daniel P. Berrange <berra...@redhat.com>wrote:

> On Mon, Apr 08, 2013 at 03:33:07PM +0300, Tal Kain wrote:
> > Signed-off-by: Tal Kain <tal.k...@ravellosystems.com>
> > ---
> >  src/qemu/qemu_capabilities.c |   13 +++++++------
> >  1 file changed, 7 insertions(+), 6 deletions(-)
>
> What is the motivation for doing this ?  it just looks like
> overkill to me, since virArchFromHost isn't really an
> expensive method to invoke.
>
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/:|
> |: http://libvirt.org              -o-             http://virt-manager.org:|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/:|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc:|
>

Hey Daniel,
Thank you for the quick reply.

This patch's motivation is not about making this function faster.
Even if virArchFromHost isn't expensive, It seemed to me like there is no
good reason for calling it 3 times at the same context, It is just
unnecessary.
Why using a local variable instead of calling the same function three times
is an overkill?

>From my perspective, by calling it just once I'm making it easier for a
reader to understand the usage of this function without reading its code.

Thanks in advance,
Tal Kain.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to