aboutsummaryrefslogtreecommitdiff
path: root/backends/rng-random.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-12-04 10:26:55 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2014-12-10 11:30:55 +0300
commit24588100ab39afead7b9a0e9c61182a02320a1b9 (patch)
treee45c7d37fccf11ce71abb612cf547d21b95561b6 /backends/rng-random.c
parent4ad608803c46c0acc09114a2e8352742ffd20b6b (diff)
downloadqemu-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 'backends/rng-random.c')
-rw-r--r--backends/rng-random.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/backends/rng-random.c b/backends/rng-random.c
index 601d9dc..4f85a8e 100644
--- a/backends/rng-random.c
+++ b/backends/rng-random.c
@@ -88,11 +88,7 @@ static char *rng_random_get_filename(Object *obj, Error **errp)
{
RndRandom *s = RNG_RANDOM(obj);
- if (s->filename) {
- return g_strdup(s->filename);
- }
-
- return NULL;
+ return g_strdup(s->filename);
}
static void rng_random_set_filename(Object *obj, const char *filename,