Skip to content

Commit

Permalink
sysctl: add the "fallthrough" annotation
Browse files Browse the repository at this point in the history
CID 152112 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: The case for value 4 is not terminated by a 'break' statement.
  • Loading branch information
avagin committed Oct 5, 2015
1 parent bcb6ff3 commit e5b69da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ static int do_sysctl_op(int fd, struct sysctl_req *req, int op)
switch (CTL_TYPE(req->type)) {
case __CTL_U32A:
nr = CTL_LEN(req->type);
/* fallthrough */
case CTL_U32:
__SYSCTL_OP(ret, fd, req, u32, nr, op);
break;
Expand All @@ -178,6 +179,7 @@ static int do_sysctl_op(int fd, struct sysctl_req *req, int op)
break;
case __CTL_U64A:
nr = CTL_LEN(req->type);
/* fallthrough */
case CTL_U64:
__SYSCTL_OP(ret, fd, req, u64, nr, op);
break;
Expand Down

0 comments on commit e5b69da

Please sign in to comment.