Mesa (master): nine: use list_is_linked
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 18 02:04:48 UTC 2020
Module: Mesa
Branch: master
Commit: c5ecb59d979f6c651c95c0d7281118db6aa3e7bb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5ecb59d979f6c651c95c0d7281118db6aa3e7bb
Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date: Tue Dec 15 15:58:24 2020 +0100
nine: use list_is_linked
Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
---
src/gallium/frontends/nine/basetexture9.c | 4 ++--
src/gallium/frontends/nine/buffer9.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/frontends/nine/basetexture9.c b/src/gallium/frontends/nine/basetexture9.c
index c9ef17c6c6e..c509a1f4621 100644
--- a/src/gallium/frontends/nine/basetexture9.c
+++ b/src/gallium/frontends/nine/basetexture9.c
@@ -99,9 +99,9 @@ NineBaseTexture9_dtor( struct NineBaseTexture9 *This )
pipe_sampler_view_reference(&This->view[0], NULL);
pipe_sampler_view_reference(&This->view[1], NULL);
- if (This->list.prev != NULL && This->list.next != NULL)
+ if (list_is_linked(&This->list))
list_del(&This->list);
- if (This->list2.prev != NULL && This->list2.next != NULL)
+ if (list_is_linked(&This->list2))
list_del(&This->list2);
NineResource9_dtor(&This->base);
diff --git a/src/gallium/frontends/nine/buffer9.c b/src/gallium/frontends/nine/buffer9.c
index 6c2bc8895da..ad4e9020f58 100644
--- a/src/gallium/frontends/nine/buffer9.c
+++ b/src/gallium/frontends/nine/buffer9.c
@@ -161,9 +161,9 @@ NineBuffer9_dtor( struct NineBuffer9 *This )
if (This->base.pool == D3DPOOL_MANAGED) {
if (This->managed.data)
align_free(This->managed.data);
- if (This->managed.list.prev != NULL && This->managed.list.next != NULL)
+ if (list_is_linked(&This->managed.list))
list_del(&This->managed.list);
- if (This->managed.list2.prev != NULL && This->managed.list2.next != NULL)
+ if (list_is_linked(&This->managed.list2))
list_del(&This->managed.list2);
}
More information about the mesa-commit
mailing list