[PATCH] domain_cgroup: Don't put semicolon at the end of VIR_GET_LIMIT_PARAMETER macro

Michal Privoznik posted 1 patch 2 years, 3 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/d58175f1ae9378c01f0feee9538994b8a45c0069.1643368501.git.mprivozn@redhat.com
src/hypervisor/domain_cgroup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[PATCH] domain_cgroup: Don't put semicolon at the end of VIR_GET_LIMIT_PARAMETER macro
Posted by Michal Privoznik 2 years, 3 months ago
In domain_cgroup.c there's VIR_GET_LIMIT_PARAMETER macro which
has a semicolon at the end of its declaration. Well, remove it so
that the places where macro is used have to put the semicolon
explicitly. This helps with automatic reformatting (at least in
vim).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/hypervisor/domain_cgroup.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/hypervisor/domain_cgroup.c b/src/hypervisor/domain_cgroup.c
index 61b54f071c..aea0817a7f 100644
--- a/src/hypervisor/domain_cgroup.c
+++ b/src/hypervisor/domain_cgroup.c
@@ -211,11 +211,11 @@ virDomainCgroupSetMemoryLimitParameters(virCgroup *cgroup,
         return -1; \
  \
     if (rc == 1) \
-        set_ ## VALUE = true;
+        set_ ## VALUE = true
 
-    VIR_GET_LIMIT_PARAMETER(VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, swap_hard_limit)
-    VIR_GET_LIMIT_PARAMETER(VIR_DOMAIN_MEMORY_HARD_LIMIT, hard_limit)
-    VIR_GET_LIMIT_PARAMETER(VIR_DOMAIN_MEMORY_SOFT_LIMIT, soft_limit)
+    VIR_GET_LIMIT_PARAMETER(VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, swap_hard_limit);
+    VIR_GET_LIMIT_PARAMETER(VIR_DOMAIN_MEMORY_HARD_LIMIT, hard_limit);
+    VIR_GET_LIMIT_PARAMETER(VIR_DOMAIN_MEMORY_SOFT_LIMIT, soft_limit);
 
 #undef VIR_GET_LIMIT_PARAMETER
 
-- 
2.34.1

Re: [PATCH] domain_cgroup: Don't put semicolon at the end of VIR_GET_LIMIT_PARAMETER macro
Posted by Laine Stump 2 years, 3 months ago
On 1/28/22 6:15 AM, Michal Privoznik wrote:
> In domain_cgroup.c there's VIR_GET_LIMIT_PARAMETER macro which
> has a semicolon at the end of its declaration. Well, remove it so
> that the places where macro is used have to put the semicolon
> explicitly. This helps with automatic reformatting (at least in
> vim).
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Reviewed-by: Laine Stump <laine@redhat.com>