seccomp: avoid shadowing of 'action' variable
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 22 Sep 2023 16:06:44 +0000 (17:06 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 29 Sep 2023 08:07:20 +0000 (10:07 +0200)
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

index d66a2a12262c6621cc469b042579048c4aacd9d5..4d7439e7f71e1bf8a8ef3301682cd0d11e2fd91b 100644 (file)
@@ -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;