Remove useless loop
This commit is contained in:
parent
37a0fd3a19
commit
5637f9e476
10
src/main.c
10
src/main.c
@ -55,12 +55,10 @@ negotiate(unsigned char* buf)
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (uint_fast8_t i = 0; i < 3; ++i) {
|
||||
if (buf[i] == DO)
|
||||
buf[i] = WONT;
|
||||
else if (buf[i] == WILL)
|
||||
buf[i] = DO;
|
||||
}
|
||||
if (buf[1] == DO)
|
||||
buf[1] = WONT;
|
||||
else if (buf[1] == WILL)
|
||||
buf[1] = DO;
|
||||
|
||||
if (send(sock, buf, 3, 0) != 3) {
|
||||
perror("ERROR: send");
|
||||
|
Loading…
Reference in New Issue
Block a user