mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
committed by
Stefan Hajnoczi
parent
29c838cdc9
commit
764ba3ae51
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user