From: Eric Blake <eblake@redhat.com>
Cc: armbru@redhat.com, Pavel Hrdina <phrdina@redhat.com>,
qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 08/11] qemu-img: introduce qemu_img_handle_error
Date: Thu, 28 Mar 2013 15:55:49 -0600 [thread overview]
Message-ID: <5154BC65.4040105@redhat.com> (raw)
In-Reply-To: <5154B92B.9030604@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
On 03/28/2013 03:42 PM, Eric Blake wrote:
> On 03/28/2013 10:47 AM, Pavel Hrdina wrote:
>> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
>> ---
>> qemu-img.c | 18 ++++++++++++------
>> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
>> +static int qemu_img_handle_error(Error *err)
>> +{
>> + if (error_is_set(&err)) {
>> + error_report("%s", error_get_pretty(err));
>> + error_free(err);
>> + return 1;
>
> A non-bool positive number is unusual for errors (-1, or a true/false
> scheme, tend to be more common)...
>
>> - if (error_is_set(&local_err)) {
>> - error_report("%s", error_get_pretty(local_err));
>> - error_free(local_err);
>> - return 1;
>
> ...but it is accurate code motion, so it doesn't impact my review.
And in reading 9/11, I found out why it struck me as unusual. I usually
spell it EXIT_FAILURE instead of 1, for a return status intended to be
used in a final exit() or return from main(). But that's a pre-existing
syndrome that affects much more of qemu-img.c, not worth changing here.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-03-28 21:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 16:47 [Qemu-devel] [PATCH v3 00/11] convert savevm to use qapi and introduce qmp command Pavel Hrdina
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 01/11] block: add error parameter to bdrv_snapshot_create() and related functions Pavel Hrdina
2013-03-28 21:23 ` Eric Blake
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 02/11] block: add error parameter to del_existing_snapshots() Pavel Hrdina
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 03/11] savevm: add error parameter to qemu_savevm_state_begin() Pavel Hrdina
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 04/11] savevm: add error parameter to qemu_savevm_state_iterate() Pavel Hrdina
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 05/11] savevm: add error parameter to qemu_savevm_state_complete() Pavel Hrdina
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 06/11] savevm: add error parameter to qemu_savevm_state() Pavel Hrdina
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 07/11] qapi: Convert savevm Pavel Hrdina
2013-03-28 21:35 ` Eric Blake
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 08/11] qemu-img: introduce qemu_img_handle_error Pavel Hrdina
2013-03-28 21:42 ` Eric Blake
2013-03-28 21:55 ` Eric Blake [this message]
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 09/11] block: update return value from bdrv_snapshot_create Pavel Hrdina
2013-03-28 21:53 ` Eric Blake
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 10/11] savevm: update return value from qemu_savevm_state Pavel Hrdina
2013-03-28 22:00 ` Eric Blake
2013-03-28 16:47 ` [Qemu-devel] [PATCH v3 11/11] savevm: add force parameter to HMP command and return snapshot info Pavel Hrdina
2013-03-28 22:03 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5154BC65.4040105@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=phrdina@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.