scst: Remove empty statements after control-flow blocks

Coccinelle misc/semicolon.cocci reports:

  iscsi-scst/usr/iscsi_scstd.c:958:2-3: Unneeded semicolon
  iscsi-scst/usr/iscsid.c:367:4-5: Unneeded semicolon
  scst/src/scst_event.c:772:2-3: Unneeded semicolon
  usr/stpgd/stpgd_main.c:269:3-4: Unneeded semicolon

Remove the trailing semicolons after the iSCSI netlink-open check, login
parameter check, event-size read check and STPG child-cleanup loop. Each
semicolon is
an empty statement after a completed block, so removing it preserves
control flow and requires no analyzer exception.
This commit is contained in:
Gleb Chesnokov
2026-10-20 18:02:29 +03:00
parent 7d991169e0
commit e21ff58d46
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -955,7 +955,7 @@ int main(int argc, char **argv)
if ((nl_fd = nl_open()) < 0) {
perror("netlink open failed");
exit(-1);
};
}
err = kernel_attr_add(NULL, ISCSI_ISNS_SERVER_ATTR_NAME,
S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR, 0);
+1 -1
View File
@@ -364,7 +364,7 @@ static void text_scan_login(struct connection *conn)
if (idx == key_max_recv_data_length) {
conn->session_params[idx].key_state = KEY_STATE_DONE;
idx = key_max_xmit_data_length;
};
}
if (params_str_to_val(session_keys, idx, value, &val) < 0) {
if (conn->session_params[idx].key_state == KEY_STATE_START) {
+1 -1
View File
@@ -769,7 +769,7 @@ static int scst_event_user_next_event(struct scst_event_priv *priv, void __user
if (res != 0) {
PRINT_ERROR("Failed to get max event size: %d", res);
goto out;
};
}
/* Waiting for at least one event, if blocking */
while (list_empty(&priv->queued_events_list)) {
+1 -1
View File
@@ -266,7 +266,7 @@ static int handle_stpg_received(struct scst_event_user *event_user)
rc = wait_until_finished(pids[k], 1, &status, k);
if (rc != 0)
break;
};
}
}
TRACE_EXIT_RES(res);