diff options
Diffstat (limited to 'tbl_qcmd.c')
-rw-r--r-- | tbl_qcmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -38,7 +38,7 @@ int tbl_exec_add(tbl_exec *tbl, tble_exec *cmd) if (tbl->size+1<tbl->max_size) { tbl->size += 1; - } else + } else { return -1; } @@ -65,7 +65,7 @@ tble_exec *tbl_exec_search_cmd(tbl_exec *tbl, char *cmd) for (i=0;i<tbl->max_size;i++) { cur_cmd = tbl->reg_cmd[i]; - if ((strncmp(cur_cmd->cmd,cmd,strlen(cmd)) == 0) && + if ((strncmp(cur_cmd->cmd,cmd,strlen(cmd)) == 0) && (strlen(cmd) == strlen(cur_cmd->cmd))) { ret = cur_cmd; @@ -160,7 +160,7 @@ int tbl_qcmd_add(tbl_qcmd *tbl, tble_qcmd *cmd) if (tbl->size+1<tbl->max_size) { tbl->size += 1; - } else + } else { return -1; } @@ -181,7 +181,7 @@ int tbl_qcmd_chk(tbl_qcmd *tbl) for (i=0;i<tbl->max_size;i++) { - //if command in some state like segfaulted or + //if command in some state like segfaulted or // finished running then lets check if ((tbl->cmd[i]->state == QCMD_TIMEOUT)|| (tbl->cmd[i]->state == QCMD_DONE)) |