From patchwork Tue Feb 7 14:09:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 139962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E4014B724A for ; Wed, 8 Feb 2012 03:07:16 +1100 (EST) Received: from localhost ([::1]:33795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rulkd-0002da-3W for incoming@patchwork.ozlabs.org; Tue, 07 Feb 2012 09:10:31 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ruljr-0001V2-NB for qemu-devel@nongnu.org; Tue, 07 Feb 2012 09:09:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rulje-0005eD-Ta for qemu-devel@nongnu.org; Tue, 07 Feb 2012 09:09:43 -0500 Received: from oxygen.pond.sub.org ([78.46.104.156]:39174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rulje-0005dI-Ne for qemu-devel@nongnu.org; Tue, 07 Feb 2012 09:09:30 -0500 Received: from blackfin.pond.sub.org (p5B32D218.dip.t-dialin.net [91.50.210.24]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 9B167A43EA; Tue, 7 Feb 2012 15:09:27 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id DE26C6007A; Tue, 7 Feb 2012 15:09:26 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 7 Feb 2012 15:09:10 +0100 Message-Id: <1328623766-12287-4-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.7.6.5 In-Reply-To: <1328623766-12287-1-git-send-email-armbru@redhat.com> References: <1328623766-12287-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 78.46.104.156 Cc: kwolf@redhat.com, aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 03/19] qemu-char: Re-apply style fixes from just reverted aad04cd0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster --- qemu-char.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 368df2e..c25863a 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -640,8 +640,9 @@ static CharDriverState *qemu_chr_open_file_out(QemuOpts *opts) TFR(fd_out = qemu_open(qemu_opt_get(opts, "path"), O_WRONLY | O_TRUNC | O_CREAT | O_BINARY, 0666)); - if (fd_out < 0) + if (fd_out < 0) { return NULL; + } return qemu_chr_open_fd(-1, fd_out); } @@ -666,8 +667,9 @@ static CharDriverState *qemu_chr_open_pipe(QemuOpts *opts) if (fd_out >= 0) close(fd_out); TFR(fd_in = fd_out = qemu_open(filename, O_RDWR | O_BINARY)); - if (fd_in < 0) + if (fd_in < 0) { return NULL; + } } return qemu_chr_open_fd(fd_in, fd_out); } @@ -764,8 +766,9 @@ static CharDriverState *qemu_chr_open_stdio(QemuOpts *opts) { CharDriverState *chr; - if (stdio_nb_clients >= STDIO_MAX_CLIENTS) + if (stdio_nb_clients >= STDIO_MAX_CLIENTS) { return NULL; + } if (stdio_nb_clients == 0) { old_fd0_flags = fcntl(0, F_GETFL); tcgetattr (0, &oldtty); @@ -1356,8 +1359,9 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts) int fd; TFR(fd = qemu_open(filename, O_RDWR)); - if (fd < 0) + if (fd < 0) { return NULL; + } if (ioctl(fd, PPCLAIM) < 0) { close(fd); @@ -1425,8 +1429,9 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts) int fd; fd = qemu_open(filename, O_RDWR); - if (fd < 0) + if (fd < 0) { return NULL; + } chr = g_malloc0(sizeof(CharDriverState)); chr->opaque = (void *)(intptr_t)fd; @@ -1795,8 +1800,9 @@ static CharDriverState *qemu_chr_open_win_file_out(QemuOpts *opts) fd_out = CreateFile(file_out, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (fd_out == INVALID_HANDLE_VALUE) + if (fd_out == INVALID_HANDLE_VALUE) { return NULL; + } return qemu_chr_open_win_file(fd_out); } @@ -2444,8 +2450,9 @@ static CharDriverState *qemu_chr_open_socket(QemuOpts *opts) fd = inet_connect_opts(opts); } } - if (fd < 0) + if (fd < 0) { goto fail; + } if (!is_waitconnect) socket_set_nonblock(fd);