aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-9p-local.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-08-19 20:24:43 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-08-19 20:24:43 +0000
commitf143efa60c44c65c22aeeb04217f3501e3d04b22 (patch)
tree5079c2aecb3f6d729a0bfc510309bf9ba9c28be6 /hw/virtio-9p-local.c
parent8e00128d325ad108289347d091a6b054dbfa8ec2 (diff)
Remove useless NULL check for qemu_strdup return value
Found with this Coccinelle semantic patch: @@ expression E; identifier ptr; identifier fn ~= "qemu_strn?dup"; @@ -ptr = fn(E); -if (ptr == NULL) { ... } - +ptr = fn(E); Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/virtio-9p-local.c')
-rw-r--r--hw/virtio-9p-local.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/virtio-9p-local.c b/hw/virtio-9p-local.c
index 04f7f6f501..43c03c188f 100644
--- a/hw/virtio-9p-local.c
+++ b/hw/virtio-9p-local.c
@@ -426,9 +426,6 @@ static int local_rename(FsContext *ctx, const char *oldpath,
int err;
tmp = qemu_strdup(rpath(ctx, oldpath));
- if (tmp == NULL) {
- return -1;
- }
err = rename(tmp, rpath(ctx, newpath));
if (err == -1) {