diff options
-rw-r--r-- | FICS/network.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/FICS/network.c b/FICS/network.c index 4fd0434..10e356d 100644 --- a/FICS/network.c +++ b/FICS/network.c @@ -556,9 +556,9 @@ PUBLIC void turn_echo_on(int fd) { int ret; - static unsigned char wont_echo[] = { IAC, WONT, TELOPT_ECHO, '\0' }; + static unsigned char wont_echo[] = {IAC, WONT, TELOPT_ECHO, '\0'}; - ret = send(fd, (char *) wont_echo, strlen((char *) wont_echo), 0); + ret = send(fd, (char *)wont_echo, sizeof wont_echo - 1, 0); if (ret == -1) warn("%s: cannot send", __func__); } @@ -567,9 +567,9 @@ PUBLIC void turn_echo_off(int fd) { int ret; - static unsigned char will_echo[] = { IAC, WILL, TELOPT_ECHO, '\0' }; + static unsigned char will_echo[] = {IAC, WILL, TELOPT_ECHO, '\0'}; - ret = send(fd, (char *) will_echo, strlen((char *) will_echo), 0); + ret = send(fd, (char *)will_echo, sizeof will_echo - 1, 0); if (ret == -1) warn("%s: cannot send", __func__); } |