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:
parent
1e13edf355
commit
e1f98fe48a
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user