qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] vl.c: reduce exit on error code duplication


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 2/2] vl.c: reduce exit on error code duplication
Date: Mon, 20 Oct 2014 10:38:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Igor Mammedov <address@hidden> writes:

> use exit_if_error() helper instead of a bunch of
>     if (local_err) {
>         error_report(foo);
>         error_free(local_err);
>         exit(1);
>     }
> code blocks
>
> Signed-off-by: Igor Mammedov <address@hidden>

A quick "git-grep -B 2 -w exit" shows the pattern exists outside vl.c.
The instances in hw/ are of course suspect.  Anyway, the helper seems
more generally useful.  Let's put it in util/ now, rather than move it
later.

Suggest to name it something like error_report_fatal(), to make both the
fact that it reports and that it exits obvious from the name.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]