diff options
author | Markus Armbruster <armbru@redhat.com> | 2012-02-07 15:09:10 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-24 09:06:57 -0600 |
commit | a89dd6c32e4b7b6868c39cfc7deba95f3cf3ce94 (patch) | |
tree | ac427dbf6f14a4bbb1dcbcb9c4b3e4b71db057f0 /qemu-char.c | |
parent | b181e04777da67acbc7448f87e4ae9f1518e08b2 (diff) | |
download | qemu-a89dd6c32e4b7b6868c39cfc7deba95f3cf3ce94.zip qemu-a89dd6c32e4b7b6868c39cfc7deba95f3cf3ce94.tar.gz qemu-a89dd6c32e4b7b6868c39cfc7deba95f3cf3ce94.tar.bz2 |
qemu-char: Re-apply style fixes from just reverted aad04cd0
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | 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); |