From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZGNJ-0000yv-Bj for qemu-devel@nongnu.org; Tue, 18 Dec 2018 09:29:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZGNE-00011e-J6 for qemu-devel@nongnu.org; Tue, 18 Dec 2018 09:29:33 -0500 From: Laurent Vivier Date: Tue, 18 Dec 2018 15:28:50 +0100 Message-Id: <20181218142851.9477-4-laurent@vivier.eu> In-Reply-To: <20181218142851.9477-1-laurent@vivier.eu> References: <20181218142851.9477-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 3/4] vl: Use error_fatal to simplify obvious fatal errors (again) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Halil Pasic , Laurent Vivier , qemu-block@nongnu.org, Cornelia Huck , Christian Borntraeger , Michael Tokarev , Richard Henderson , Paolo Bonzini , Michael Roth , Eduardo Habkost , qemu-s390x@nongnu.org, Collin Walling , Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , David Hildenbrand , Kevin Wolf , Max Reitz , qemu-trivial@nongnu.org From: Markus Armbruster Patch created mechanically by rerunning: $ spatch --in-place --sp-file scripts/coccinelle/use-error_fatal.cocci \ --macro-file scripts/cocci-macro-file.h vl.c Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20181213175807.12039-1-armbru@redhat.com> Signed-off-by: Laurent Vivier --- vl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index 2a8b2ee16d..530fad6a71 100644 --- a/vl.c +++ b/vl.c @@ -3133,11 +3133,8 @@ int main(int argc, char **argv, char **envp) Visitor *v; BlockdevOptions_queue *bdo; - v = qobject_input_visitor_new_str(optarg, "driver", &err); - if (!v) { - error_report_err(err); - exit(1); - } + v = qobject_input_visitor_new_str(optarg, "driver", + &error_fatal); bdo = g_new(BlockdevOptions_queue, 1); visit_type_BlockdevOptions(v, NULL, &bdo->bdo, -- 2.19.2