summaryrefslogtreecommitdiffstats
path: root/chardev
diff options
context:
space:
mode:
authorMarc-André Lureau2016-12-14 21:15:44 +0100
committerMarc-André Lureau2017-05-04 13:34:41 +0200
commite1f98fe48a049366e754c055cc3ea99dcf6cb688 (patch)
tree06fd1424c37c5a75d6ba03d26700a5d8a23c2f07 /chardev
parentchar: remove chardevs list (diff)
downloadqemu-e1f98fe48a049366e754c055cc3ea99dcf6cb688.tar.gz
qemu-e1f98fe48a049366e754c055cc3ea99dcf6cb688.tar.xz
qemu-e1f98fe48a049366e754c055cc3ea99dcf6cb688.zip
char: useless NULL check
g_strdup(NULL) returns NULL already. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'chardev')
-rw-r--r--chardev/char.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chardev/char.c b/chardev/char.c
index aee8b4555d..33dbab6981 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -764,7 +764,7 @@ void qemu_chr_parse_common(QemuOpts *opts, ChardevCommon *backend)
const char *logfile = qemu_opt_get(opts, "logfile");
backend->has_logfile = logfile != NULL;
- backend->logfile = logfile ? g_strdup(logfile) : NULL;
+ backend->logfile = g_strdup(logfile);
backend->has_logappend = true;
backend->logappend = qemu_opt_get_bool(opts, "logappend", false);