projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e13edf
)
char: useless NULL check
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Wed, 14 Dec 2016 20:15:44 +0000
(23:15 +0300)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 4 May 2017 11:34:41 +0000
(15:34 +0400)
g_strdup(NULL) returns NULL already.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
chardev/char.c
patch
|
blob
|
history
diff --git
a/chardev/char.c
b/chardev/char.c
index aee8b4555da9a558178468e6016e8e197268a994..33dbab6981d7ce3077eaaa0cd4eecbfaf4fdf168 100644
(file)
--- 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);