diff options
author | mcpcpc <michaelczigler@icloud.com> | 2020-10-10 08:26:24 -0400 |
---|---|---|
committer | mcpcpc <michaelczigler@icloud.com> | 2020-10-10 08:26:24 -0400 |
commit | 1c4d2f948fe18ce24ebfd0411049e26132782fb4 (patch) | |
tree | c0c68af04e60099b16c109b55c9412172c333694 | |
parent | Fix Out-of-bound read (#57) (diff) | |
download | kirc-1c4d2f948fe18ce24ebfd0411049e26132782fb4.tar.gz kirc-1c4d2f948fe18ce24ebfd0411049e26132782fb4.tar.bz2 kirc-1c4d2f948fe18ce24ebfd0411049e26132782fb4.tar.xz kirc-1c4d2f948fe18ce24ebfd0411049e26132782fb4.tar.zst kirc-1c4d2f948fe18ce24ebfd0411049e26132782fb4.zip |
remove byteswaiting variable
-rw-r--r-- | kirc.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -618,19 +618,16 @@ int main(int argc, char **argv) { fds[1].events = POLLIN; char usrin[MSG_MAX]; - int byteswaiting = 1; for (;;) { int poll_res = poll(fds, 2, -1); if (poll_res != -1) { if (fds[0].revents & POLLIN) { - byteswaiting = 0; edit(usrin, MSG_MAX); printf("\n\x1b[0F\x1b[0K"); handleUserInput(usrin); - byteswaiting = 1; } - if (fds[1].revents & POLLIN && byteswaiting) { + if (fds[1].revents & POLLIN) { disableRawMode(); int rc = handleServerMessage(); if (rc != 0) { |