systemd/SOURCES/0111-basic-alloc-util-remove-unnecessary-parens.patch

29 lines
1.1 KiB
Diff
Raw Normal View History

2022-11-15 06:58:41 +00:00
From 965a99f34a185bb3b3aa5ac0e9e5d5eb05d0fac0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 9 May 2022 15:11:20 +0200
Subject: [PATCH] basic/alloc-util: remove unnecessary parens
Those symbols are not macros anymore, so we can drop parens.
(cherry picked from commit 96d651a22bf62e63080e489cb45e82bead11aa5d)
Related: #2087652
---
src/basic/alloc-util.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h
index 65d5175619..f57bcbdbcd 100644
--- a/src/basic/alloc-util.h
+++ b/src/basic/alloc-util.h
@@ -54,8 +54,8 @@ typedef void (*free_func_t)(void *p);
typeof(a)* _a = &(a); \
typeof(b)* _b = &(b); \
free(*_a); \
- (*_a) = (*_b); \
- (*_b) = NULL; \
+ *_a = *_b; \
+ *_b = NULL; \
0; \
})