qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: qemu-trivial@nongnu.org
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
	mjt@tls.msk.ru, peter.huangpeng@huawei.com,
	qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/5] qemu-char: remove unnecessary in-parameter check for qemu_chr_parse_pipe
Date: Mon, 3 Nov 2014 17:44:29 +0800	[thread overview]
Message-ID: <1415007872-8228-3-git-send-email-zhang.zhanghailiang@huawei.com> (raw)
In-Reply-To: <1415007872-8228-1-git-send-email-zhang.zhanghailiang@huawei.com>

The check has been done in qemu_chr_parse_pipe, so we don't need to
check it again in qemu_chr_parse_pipe.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
---
 qemu-char.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index 04d747a..e1f0e28 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1084,11 +1084,6 @@ static CharDriverState *qemu_chr_open_pipe(ChardevHostdev *opts)
     char filename_out[CHR_MAX_FILENAME_SIZE];
     const char *filename = opts->device;
 
-    if (filename == NULL) {
-        fprintf(stderr, "chardev: pipe: no filename given\n");
-        return NULL;
-    }
-
     snprintf(filename_in, CHR_MAX_FILENAME_SIZE, "%s.in", filename);
     snprintf(filename_out, CHR_MAX_FILENAME_SIZE, "%s.out", filename);
     TFR(fd_in = qemu_open(filename_in, O_RDWR | O_BINARY));
-- 
1.7.12.4

  parent reply	other threads:[~2014-11-03  9:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  9:44 [Qemu-devel] [PATCH v2 0/5] Trivial patch about qemu-char zhanghailiang
2014-11-03  9:44 ` [Qemu-devel] [PATCH v2 1/5] qemu-char: fix parameter check for some qemu_chr_parse_* functions zhanghailiang
2014-11-03  9:44 ` zhanghailiang [this message]
2014-11-03  9:44 ` [Qemu-devel] [PATCH v2 3/5] spice-qemu-char: fix parameter checks for " zhanghailiang
2014-11-03  9:44 ` [Qemu-devel] [PATCH v2 4/5] qemu-char: convert some open functions to use Error API zhanghailiang
2014-11-03  9:44 ` [Qemu-devel] [PATCH v2 5/5] spice-qemu-char: convert qemu_chr_open_spice_vmc " zhanghailiang
2014-11-03 10:04   ` Michael Tokarev
2014-11-03 11:17     ` zhanghailiang
2014-11-03 10:03 ` [Qemu-devel] [PATCH v2 0/5] Trivial patch about qemu-char Michael Tokarev
2014-11-03 11:39   ` zhanghailiang
2014-11-03 14:10     ` Michael Tokarev
2014-11-04  2:17       ` zhanghailiang
2014-11-03 15:33     ` Markus Armbruster
2014-11-04  2:20       ` zhanghailiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1415007872-8228-3-git-send-email-zhang.zhanghailiang@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).