<div dir="ltr"><div>On Mon, Apr 8, 2013 at 4:32 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On Mon, Apr 08, 2013 at 03:33:07PM +0300, Tal Kain wrote:<br>

> Signed-off-by: Tal Kain <<a href="mailto:tal.kain@ravellosystems.com">tal.kain@ravellosystems.com</a>><br>
> ---<br>
>  src/qemu/qemu_capabilities.c |   13 +++++++------<br>
>  1 file changed, 7 insertions(+), 6 deletions(-)<br>
<br>
</div>What is the motivation for doing this ?  it just looks like<br>
overkill to me, since virArchFromHost isn't really an<br>
expensive method to invoke.<br>
<span class=""><font color="#888888"><br>
Daniel<br>
--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</font></span></blockquote></div><br></div><div class="gmail_extra"><div>Hey Daniel,</div><div>Thank you for the quick reply.</div><div><br></div><div>This patch's motivation is not about making this function faster.</div>
<div>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.</div><div>Why using a local variable instead of calling the same function three times is an overkill?</div>
<div><br></div><div>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.</div><div><br></div><div>Thanks in advance,</div><div>
Tal Kain.</div></div></div>