diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-12-04 10:26:55 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-12-10 11:30:55 +0300 |
commit | 24588100ab39afead7b9a0e9c61182a02320a1b9 (patch) | |
tree | e45c7d37fccf11ce71abb612cf547d21b95561b6 /hw/tpm/tpm_passthrough.c | |
parent | 4ad608803c46c0acc09114a2e8352742ffd20b6b (diff) | |
download | qemu-24588100ab39afead7b9a0e9c61182a02320a1b9.zip qemu-24588100ab39afead7b9a0e9c61182a02320a1b9.tar.gz qemu-24588100ab39afead7b9a0e9c61182a02320a1b9.tar.bz2 |
Drop superfluous conditionals around g_strdup()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/tpm/tpm_passthrough.c')
-rw-r--r-- | hw/tpm/tpm_passthrough.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index 56e9e0f..2bf3c6f 100644 --- a/hw/tpm/tpm_passthrough.c +++ b/hw/tpm/tpm_passthrough.c @@ -400,9 +400,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) const char *value; value = qemu_opt_get(opts, "cancel-path"); - if (value) { - tb->cancel_path = g_strdup(value); - } + tb->cancel_path = g_strdup(value); value = qemu_opt_get(opts, "path"); if (!value) { |