[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 49/56] seccomp: avoid shadowing of 'action' variable
From: |
Markus Armbruster |
Subject: |
[PULL 49/56] seccomp: avoid shadowing of 'action' variable |
Date: |
Fri, 29 Sep 2023 10:50:46 +0200 |
From: Daniel P. Berrangé <berrange@redhat.com>
This is confusing as one 'action' variable is used for storing
a SCMP_ enum value, while the other 'action' variable is used
for storing a SECCOMP_ enum value.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20230922160644.438631-3-berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
softmmu/qemu-seccomp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c
index d66a2a1226..4d7439e7f7 100644
--- a/softmmu/qemu-seccomp.c
+++ b/softmmu/qemu-seccomp.c
@@ -283,9 +283,9 @@ static uint32_t qemu_seccomp_update_action(uint32_t action)
if (action == SCMP_ACT_TRAP) {
static int kill_process = -1;
if (kill_process == -1) {
- uint32_t action = SECCOMP_RET_KILL_PROCESS;
+ uint32_t testaction = SECCOMP_RET_KILL_PROCESS;
- if (qemu_seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &action) == 0) {
+ if (qemu_seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &testaction) == 0) {
kill_process = 1;
} else {
kill_process = 0;
--
2.41.0
- [PULL 06/56] block: Clean up local variable shadowing, (continued)
- [PULL 06/56] block: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 22/56] util/vhost-user-server: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 31/56] spapr: Clean up local variable shadowing in spapr_dt_cpus(), Markus Armbruster, 2023/09/29
- [PULL 45/56] aspeed/i3c: Rename variable shadowing a local, Markus Armbruster, 2023/09/29
- [PULL 05/56] block/vdi: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 11/56] target/mips: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 15/56] hw/arm/virt: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 09/56] target/arm/tcg: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 04/56] block/dirty-bitmap: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 02/56] migration: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 49/56] seccomp: avoid shadowing of 'action' variable,
Markus Armbruster <=
- [PULL 47/56] intel_iommu: Fix shadow local variables on "size", Markus Armbruster, 2023/09/29
- [PULL 12/56] target/m68k: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 34/56] spapr/drc: Clean up local variable shadowing in rtas_ibm_configure_connector(), Markus Armbruster, 2023/09/29
- [PULL 38/56] hw/acpi: changes towards enabling -Wshadow=local, Markus Armbruster, 2023/09/29
- [PULL 32/56] spapr: Clean up local variable shadowing in spapr_init_cpus(), Markus Armbruster, 2023/09/29
- [PULL 23/56] linux-user/strace: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 13/56] target/tricore: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 17/56] hw/m68k: Clean up local variable shadowing, Markus Armbruster, 2023/09/29