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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint_fast8_t i = 0; i < 3; ++i) {
|
if (buf[1] == DO)
|
||||||
if (buf[i] == DO)
|
buf[1] = WONT;
|
||||||
buf[i] = WONT;
|
else if (buf[1] == WILL)
|
||||||
else if (buf[i] == WILL)
|
buf[1] = DO;
|
||||||
buf[i] = DO;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (send(sock, buf, 3, 0) != 3) {
|
if (send(sock, buf, 3, 0) != 3) {
|
||||||
perror("ERROR: send");
|
perror("ERROR: send");
|
||||||
|
Loading…
Reference in New Issue
Block a user