[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/12] audio/pw: needless check for NULL
|
From: |
marcandre . lureau |
|
Subject: |
[PATCH 05/12] audio/pw: needless check for NULL |
|
Date: |
Sat, 6 May 2023 20:37:28 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
g_clear_pointer() already checks for NULL.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
audio/pwaudio.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/audio/pwaudio.c b/audio/pwaudio.c
index 51cfc0b052..6ca4ef4f62 100644
--- a/audio/pwaudio.c
+++ b/audio/pwaudio.c
@@ -834,12 +834,8 @@ fail:
if (pw->thread_loop) {
pw_thread_loop_stop(pw->thread_loop);
}
- if (pw->context) {
- g_clear_pointer(&pw->context, pw_context_destroy);
- }
- if (pw->thread_loop) {
- g_clear_pointer(&pw->thread_loop, pw_thread_loop_destroy);
- }
+ g_clear_pointer(&pw->context, pw_context_destroy);
+ g_clear_pointer(&pw->thread_loop, pw_thread_loop_destroy);
return NULL;
}
--
2.40.1
- [PATCH 00/12] audio: pipewire backend improvements, marcandre . lureau, 2023/05/06
- [PATCH 01/12] libvirt-ci: update submodule to cover pipewire, marcandre . lureau, 2023/05/06
- [PATCH 02/12] tests/lcitool: add pipewire, marcandre . lureau, 2023/05/06
- [PATCH 03/12] audio/pw: Pipewire->PipeWire case fix for user-visible text, marcandre . lureau, 2023/05/06
- [PATCH 04/12] audio/pw: drop needless case statement, marcandre . lureau, 2023/05/06
- [PATCH 05/12] audio/pw: needless check for NULL,
marcandre . lureau <=
- [PATCH 06/12] audio/pw: trace during init before calling pipewire API, marcandre . lureau, 2023/05/06
- [PATCH 07/12] audio/pw: add more details on error, marcandre . lureau, 2023/05/06
- [PATCH 08/12] audio/pw: factorize some common code, marcandre . lureau, 2023/05/06
- [PATCH 09/12] audio/pw: add more error reporting, marcandre . lureau, 2023/05/06