]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
seccomp: get_action_name()
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 24 May 2018 11:46:06 +0000 (13:46 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 24 May 2018 11:46:06 +0000 (13:46 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/seccomp.c

index aae1921b48e09b972409245b9c4236fd37f4a11e..f03dc4ab5060efb7706e7d5982e9d4f60cf7f5e3 100644 (file)
@@ -97,7 +97,7 @@ static uint32_t get_v2_default_action(char *line)
 static const char *get_action_name(uint32_t action)
 {
        /* The upper 16 bits indicate the type of the seccomp action. */
-       switch(action & 0xffff0000){
+       switch (action & 0xffff0000) {
        case SCMP_ACT_KILL:
                return "kill";
        case SCMP_ACT_ALLOW:
@@ -106,9 +106,9 @@ static const char *get_action_name(uint32_t action)
                return "trap";
        case SCMP_ACT_ERRNO(0):
                return "errno";
-       default:
-               return "invalid action";
        }
+
+       return "invalid action";
 }
 
 static uint32_t get_v2_action(char *line, uint32_t def_action)