Skip to contentSkip to conversation

linux-user: fix missing break

PATCH Applied Laurent Vivier 2 participants 3 messages Nov 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: fix missing break

Reported by Coverity (CID 1407221)

Fixes a2d866827bd8 ("linux-user: Support for NETLINK socket options")
cc Josh Kunz <[email protected]>
---
 linux-user/syscall.c | 1 +
 1 file changed, 1 insertion(+)
linux-user/syscall.c +1 -0
index ab9d933e53af..4e97bcf1e5a9 100644
@@ -2632,6 +2632,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
         default:
             goto unimplemented;
         }
+        break;
 #endif /* SOL_NETLINK */
     default:
     unimplemented:
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Laurent Vivier

Reported by Coverity (CID 1407221)

Fixes a2d866827bd8 ("linux-user: Support for NETLINK socket options")
cc Josh Kunz <[email protected]>
---
  linux-user/syscall.c | 1 +
  1 file changed, 1 insertion(+)
linux-user/syscall.c +0 -0
index ab9d933e53af..4e97bcf1e5a9 100644

linux-user/syscall.c static abi_long do_getsockopt(int sockfd, int level, int optname, · line 2638

Quoted 7 lines
linux-user/syscall.c +1 -0
@@ -2632,6 +2632,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
          default:
              goto unimplemented;
          }
+        break;
  #endif /* SOL_NETLINK */
      default:
      unimplemented:
author Applied
#2 lore raw
In reply to Laurent Vivier

Le 12/11/2019 à 11:50, Laurent Vivier a écrit :

Quoted 14 lines

Reported by Coverity (CID 1407221)

Fixes a2d866827bd8 ("linux-user: Support for NETLINK socket options")
cc Josh Kunz <[email protected]>
---
 linux-user/syscall.c | 1 +
 1 file changed, 1 insertion(+)
linux-user/syscall.c +0 -0
index ab9d933e53af..4e97bcf1e5a9 100644

linux-user/syscall.c static abi_long do_getsockopt(int sockfd, int level, int optname, · line 2638

Quoted 7 lines
linux-user/syscall.c +1 -0
@@ -2632,6 +2632,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
         default:
             goto unimplemented;
         }
+        break;
 #endif /* SOL_NETLINK */
     default:
     unimplemented:

Applied to my linux-user branch.

Thanks,
Laurent