Skip to content

Commit 1c4d2f9

Browse files
committed
remove byteswaiting variable
1 parent b352e7a commit 1c4d2f9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kirc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,19 +618,16 @@ int main(int argc, char **argv) {
618618
fds[1].events = POLLIN;
619619

620620
char usrin[MSG_MAX];
621-
int byteswaiting = 1;
622621

623622
for (;;) {
624623
int poll_res = poll(fds, 2, -1);
625624
if (poll_res != -1) {
626625
if (fds[0].revents & POLLIN) {
627-
byteswaiting = 0;
628626
edit(usrin, MSG_MAX);
629627
printf("\n\x1b[0F\x1b[0K");
630628
handleUserInput(usrin);
631-
byteswaiting = 1;
632629
}
633-
if (fds[1].revents & POLLIN && byteswaiting) {
630+
if (fds[1].revents & POLLIN) {
634631
disableRawMode();
635632
int rc = handleServerMessage();
636633
if (rc != 0) {

0 commit comments

Comments
 (0)