Skip to content

Commit 98860a7

Browse files
Gancho Tenevgtenev
authored andcommitted
coverity 1021924: Missing break in switch
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.
1 parent f6df9a7 commit 98860a7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

example/null_transform/null_transform.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,17 @@ null_transform(TSCont contp, TSEvent event, void *edata ATS_UNUSED)
232232
*/
233233
TSVConnShutdown(TSTransformOutputVConnGet(contp), 0, 1);
234234
break;
235+
236+
/* If we get a WRITE_READY event or any other type of
237+
* event (sent, perhaps, because we were re-enabled) then
238+
* we'll attempt to transform more data.
239+
*/
235240
case TS_EVENT_VCONN_WRITE_READY:
236241
TSDebug(PLUGIN_NAME, "\tEvent is TS_EVENT_VCONN_WRITE_READY");
242+
handle_transform(contp);
243+
break;
237244
default:
238245
TSDebug(PLUGIN_NAME, "\t(event is %d)", event);
239-
/* If we get a WRITE_READY event or any other type of
240-
* event (sent, perhaps, because we were reenabled) then
241-
* we'll attempt to transform more data.
242-
*/
243246
handle_transform(contp);
244247
break;
245248
}

0 commit comments

Comments
 (0)