diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2025-03-09 01:15:30 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2025-03-09 01:15:30 +0100 |
commit | a608deb0d374cb7e1e7557d5e907ff18f02f82f2 (patch) | |
tree | 8b1619f85025914de69b447c60bf521da69043a4 /FICS | |
parent | 0b2b95ce7030d57b0a9f7ea08de80cb903ebcc76 (diff) |
Usage of sizeof
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/network.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FICS/network.c b/FICS/network.c index 393e315..fd8732e 100644 --- a/FICS/network.c +++ b/FICS/network.c @@ -401,7 +401,7 @@ readline2(comstr_t *cs, int who) state = 3; // this is cheesy // but we aren't using em } else if (*s == AYT) { - send(fd, (char *)ayt, strlen((char *)ayt), 0); + send(fd, (char *)ayt, sizeof ayt - 1, 0); state = 2; } else if (*s == EL) { // erase line d = start; @@ -435,10 +435,10 @@ readline2(comstr_t *cs, int who) case 4: // got IAC DO if (*s == TELOPT_TM) { send(fd, (char *)will_tm, - strlen((char *)will_tm), 0); + sizeof will_tm - 1, 0); } else if (*s == TELOPT_SGA) { send(fd, (char *)will_sga, - strlen((char *)will_sga), 0); + sizeof will_sga - 1, 0); } state = 2; break; |