diff options
author | Markus Armbruster | 2013-01-22 11:07:57 +0100 |
---|---|---|
committer | Stefan Hajnoczi | 2013-01-30 11:14:46 +0100 |
commit | c64f50d1e250879611e6f328e2c4fb18c8a4ab0c (patch) | |
tree | 93e1a5b9279becfec8eba4477924cfa67a1f89b0 /hw/9pfs | |
parent | g_malloc(0) and g_malloc0(0) return NULL; simplify (diff) | |
download | qemu-c64f50d1e250879611e6f328e2c4fb18c8a4ab0c.tar.gz qemu-c64f50d1e250879611e6f328e2c4fb18c8a4ab0c.tar.xz qemu-c64f50d1e250879611e6f328e2c4fb18c8a4ab0c.zip |
g_strdup(NULL) returns NULL; simplify
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/9pfs')
-rw-r--r-- | hw/9pfs/virtio-9p-device.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 6f427dfc5d..6eab7f7fa1 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -85,11 +85,7 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf) } s->ctx.export_flags = fse->export_flags; - if (fse->path) { - s->ctx.fs_root = g_strdup(fse->path); - } else { - s->ctx.fs_root = NULL; - } + s->ctx.fs_root = g_strdup(fse->path); s->ctx.exops.get_st_gen = NULL; len = strlen(conf->tag); if (len > MAX_TAG_LEN - 1) { |