diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-12-14 23:15:44 +0300 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-05-04 15:34:41 +0400 |
commit | e1f98fe48a049366e754c055cc3ea99dcf6cb688 (patch) | |
tree | 06fd1424c37c5a75d6ba03d26700a5d8a23c2f07 /chardev | |
parent | 1e13edf355614db7c755df8fbf84d9d84b4bce92 (diff) |
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.c | 2 |
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); |