Skip to content

Commit

Permalink
coverity 1021924: Missing break in switch
Browse files Browse the repository at this point in the history
Problem:
  CID 1021924 (#1 of 1): Missing break in switch (MISSING_BREAK)
  unterminated_case: The case for value TS_EVENT_VCONN_WRITE_READY is not terminated by a 'break' statement.

Solution:
  It was intended not to have a break (not a bug), so refactored the code to make coverity happy.
  • Loading branch information
Gancho Tenev authored and gtenev committed May 8, 2017
1 parent f6df9a7 commit 98860a7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions example/null_transform/null_transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,17 @@ null_transform(TSCont contp, TSEvent event, void *edata ATS_UNUSED)
*/
TSVConnShutdown(TSTransformOutputVConnGet(contp), 0, 1);
break;

/* If we get a WRITE_READY event or any other type of
* event (sent, perhaps, because we were re-enabled) then
* we'll attempt to transform more data.
*/
case TS_EVENT_VCONN_WRITE_READY:
TSDebug(PLUGIN_NAME, "\tEvent is TS_EVENT_VCONN_WRITE_READY");
handle_transform(contp);
break;
default:
TSDebug(PLUGIN_NAME, "\t(event is %d)", event);
/* If we get a WRITE_READY event or any other type of
* event (sent, perhaps, because we were reenabled) then
* we'll attempt to transform more data.
*/
handle_transform(contp);
break;
}
Expand Down

0 comments on commit 98860a7

Please sign in to comment.