Igor Mammedov <imamm...@redhat.com> 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 <imamm...@redhat.com>
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.