aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2023-09-22 17:06:44 +0100
committerMarkus Armbruster <armbru@redhat.com>2023-09-29 10:07:20 +0200
commit0d57919acf27ca343981f69cec33463887e0a716 (patch)
tree8fc5daa7bca9f0863b85b482cba7bd9d14a9e893
parent3cc9fe177f412494f084923149338c51dd232b9b (diff)
downloadqemu-0d57919acf27ca343981f69cec33463887e0a716.zip
qemu-0d57919acf27ca343981f69cec33463887e0a716.tar.gz
qemu-0d57919acf27ca343981f69cec33463887e0a716.tar.bz2
seccomp: avoid shadowing of 'action' variable
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>
-rw-r--r--softmmu/qemu-seccomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c
index d66a2a1..4d7439e 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;