diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-09-09 03:41:09 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-09-09 03:41:09 +0000 |
commit | 3738a71b2e358307482a24229b8cd100ab150eab (patch) | |
tree | eb752407af8f18917bbf5971230e47e2ff66b2c5 /usr.bin/telnet/sys_bsd.c | |
parent | e53bf16d9b38d7d93c5dd1cefe25ee6f4a5b8086 (diff) |
Eliminate a pile of casts that were superfluous or wrong, or that were
the result of bad type choices, particularly (unsigned char *) vs
(const char *). Also, use reallocarray().
Diffstat (limited to 'usr.bin/telnet/sys_bsd.c')
-rw-r--r-- | usr.bin/telnet/sys_bsd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/telnet/sys_bsd.c b/usr.bin/telnet/sys_bsd.c index 8bc4813242c..1ccb7d6504f 100644 --- a/usr.bin/telnet/sys_bsd.c +++ b/usr.bin/telnet/sys_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_bsd.c,v 1.27 2014/07/22 07:30:24 jsg Exp $ */ +/* $OpenBSD: sys_bsd.c,v 1.28 2014/09/09 03:41:08 guenther Exp $ */ /* $NetBSD: sys_bsd.c,v 1.11 1996/02/28 21:04:10 thorpej Exp $ */ /* @@ -417,8 +417,8 @@ TerminalNewMode(int f) if (tcsetattr(tin, TCSADRAIN, &tmp_tc) < 0) tcsetattr(tin, TCSANOW, &tmp_tc); - ioctl(tin, FIONBIO, (char *)&onoff); - ioctl(tout, FIONBIO, (char *)&onoff); + ioctl(tin, FIONBIO, &onoff); + ioctl(tout, FIONBIO, &onoff); } /* @@ -521,7 +521,7 @@ TerminalWindowSize(long *rows, long *cols) #ifdef TIOCGWINSZ struct winsize ws; - if (ioctl(fileno(stdin), TIOCGWINSZ, (char *)&ws) >= 0) { + if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) >= 0) { *rows = ws.ws_row; *cols = ws.ws_col; return 1; @@ -694,7 +694,7 @@ process_rings(int netin, int netout, int netex, int ttyin, int ttyout, int canread; canread = ring_empty_consecutive(&netiring); - c = recv(net, (char *)netiring.supply, canread, 0); + c = recv(net, netiring.supply, canread, 0); if (c < 0 && errno == EWOULDBLOCK) { c = 0; } else if (c <= 0) { |