summaryrefslogtreecommitdiff
path: root/miscutils/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/chat.c')
-rw-r--r--miscutils/chat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/miscutils/chat.c b/miscutils/chat.c
index 50c5ad9..64d4ba4 100644
--- a/miscutils/chat.c
+++ b/miscutils/chat.c
@@ -233,7 +233,8 @@ int chat_main(int argc ATTRIBUTE_UNUSED, char **argv)
//-----------------------
// do expect
//-----------------------
- size_t expect_len, buf_len = 0;
+ int expect_len;
+ size_t buf_len = 0;
size_t max_len = max_abort_len;
struct pollfd pfd;
@@ -315,7 +316,7 @@ int chat_main(int argc ATTRIBUTE_UNUSED, char **argv)
exitcode = ERR_OK;
// expected reply received? -> goto next command
- delta = buf_len-expect_len;
+ delta = buf_len - expect_len;
if (delta >= 0 && !memcmp(buf+delta, expect, expect_len))
goto expect_done;
#undef buf