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>
This commit is contained in:
Marc-André Lureau 2016-12-14 23:15:44 +03:00
parent 1e13edf355
commit e1f98fe48a

View File

@ -764,7 +764,7 @@ void qemu_chr_parse_common(QemuOpts *opts, ChardevCommon *backend)
const char *logfile = qemu_opt_get(opts, "logfile"); const char *logfile = qemu_opt_get(opts, "logfile");
backend->has_logfile = logfile != NULL; backend->has_logfile = logfile != NULL;
backend->logfile = logfile ? g_strdup(logfile) : NULL; backend->logfile = g_strdup(logfile);
backend->has_logappend = true; backend->has_logappend = true;
backend->logappend = qemu_opt_get_bool(opts, "logappend", false); backend->logappend = qemu_opt_get_bool(opts, "logappend", false);