aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2015-06-29 16:12:13 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2015-07-02 10:06:23 +0100
commit764ba3ae511adddfa750db290ac8375d660ca5b9 (patch)
treeacbc34609f422f0f2bb0f9cb39ad8d4c8c39bf96 /block
parent29c838cdc96c4d117f00c75bbcb941e1be9590fb (diff)
block: remove redundant check before g_slist_find()
An empty GSList is represented by a NULL pointer, therefore it's a perfectly valid argument for g_slist_find() and there's no need to make any additional check. Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: 1435583533-5758-1-git-send-email-berto@igalia.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/io.c b/block/io.c
index ad31822b08..305e0d952e 100644
--- a/block/io.c
+++ b/block/io.c
@@ -283,7 +283,7 @@ void bdrv_drain_all(void)
}
aio_context_release(aio_context);
- if (!aio_ctxs || !g_slist_find(aio_ctxs, aio_context)) {
+ if (!g_slist_find(aio_ctxs, aio_context)) {
aio_ctxs = g_slist_prepend(aio_ctxs, aio_context);
}
}