aboutsummaryrefslogtreecommitdiffstats
path: root/tbl_qcmd.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-02-25 21:06:00 +0000
committerFreeArtMan <dos21h@gmail.com>2017-02-25 21:06:00 +0000
commit927ab156f3ea4caac01e45e1d96e719fa3a53638 (patch)
tree29a78376c1b6c2be5340c38a386b17639c2f7299 /tbl_qcmd.c
parent913db4648dabfce65e58a128a35c356ac0042ae9 (diff)
downloadagni-927ab156f3ea4caac01e45e1d96e719fa3a53638.tar.gz
agni-927ab156f3ea4caac01e45e1d96e719fa3a53638.zip
GLued up socket connectiona and messaging
Diffstat (limited to 'tbl_qcmd.c')
-rw-r--r--tbl_qcmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tbl_qcmd.c b/tbl_qcmd.c
index dea78e0..16ce944 100644
--- a/tbl_qcmd.c
+++ b/tbl_qcmd.c
@@ -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))
@@ -209,7 +209,7 @@ int tbl_qcmd_del(tbl_qcmd *tbl, int idx)
return -1;
}
- if (tbl->size = 1)
+ if (tbl->size == 1)
{
tbl->size = 0;
return 0;