On 10/13/2011 03:15 AM, Daniel Veillard wrote:
On Wed, Oct 12, 2011 at 06:30:08PM -0600, Eric Blake wrote:
> Detected by Coverity. p (the pointer to the string) is always true;
> when in reality, we wanted to know whether the integer value of the
> just-parsed string is '0' or '1'. Logic bug since commit b1b5b51.
>
> * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetBlockInfo): Set
> results to proper value.
> ---
> - info->removable = p != NULL;
> + info->removable = tmp != 0;
I would be tempted to put braces
info->removable = (tmp != 0);
to make it obvious that the second part is computation, not cascaded
affectations
Done,
But it's cosmetic, ACK
and pushed.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org