From ea159e7af0b95468bfcb9f778acfccb0269ab263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 16 Sep 2023 17:21:08 +0200 Subject: [PATCH] spa: utils: cleanup: remove unnecessary cast `spa_exchange()` already returns a value with the type of the first input, so there is no need to cast again. --- spa/include/spa/utils/cleanup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/include/spa/utils/cleanup.h b/spa/include/spa/utils/cleanup.h index 2b1f251f1..e63204c60 100644 --- a/spa/include/spa/utils/cleanup.h +++ b/spa/include/spa/utils/cleanup.h @@ -44,7 +44,7 @@ __extension__ ({ \ #if __GNUC__ >= 10 || defined(__clang__) #define spa_steal_ptr(ptr) ((__typeof__(*(ptr)) *) spa_exchange((ptr), NULL)) #else -#define spa_steal_ptr(ptr) ((__typeof__(ptr)) spa_exchange((ptr), NULL)) +#define spa_steal_ptr(ptr) spa_exchange((ptr), NULL) #endif #define spa_steal_fd(fd) spa_exchange((fd), -1)