diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-04-25 04:43:06 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-04-25 04:43:06 +0000 |
commit | db749bcf19169288df9fe9c2343cb6d6f50b47c4 (patch) | |
tree | 6b51acb9549e46d6a50235b6d5c163dcb0774552 /libexec | |
parent | 4df4526ca946eab34f32c99ddda5309adc95dc09 (diff) |
Fix casts in args to mem*. Boy am I anal.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/telnetd/sys_term.c | 20 | ||||
-rw-r--r-- | libexec/telnetd/telnetd.c | 18 | ||||
-rw-r--r-- | libexec/telnetd/termstat.c | 6 | ||||
-rw-r--r-- | libexec/telnetd/utility.c | 10 |
4 files changed, 27 insertions, 27 deletions
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index e8c764121cd..bd31be4587a 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_term.c,v 1.11 1998/04/01 08:28:19 deraadt Exp $ */ +/* $OpenBSD: sys_term.c,v 1.12 1998/04/25 04:43:02 millert Exp $ */ /* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: sys_term.c,v 1.11 1998/04/01 08:28:19 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: sys_term.c,v 1.12 1998/04/25 04:43:02 millert Exp $"; #endif #endif /* not lint */ @@ -225,7 +225,7 @@ copy_termbuf(cp, len) { if (len > sizeof(termbuf)) len = sizeof(termbuf); - memmove((char *)&termbuf, cp, len); + memmove((void *)&termbuf, cp, len); termbuf2 = termbuf; } #endif /* defined(LINEMODE) && defined(TIOCPKT_IOCTL) */ @@ -237,19 +237,19 @@ set_termbuf() * Only make the necessary changes. */ #ifndef USE_TERMIO - if (memcmp((char *)&termbuf.sg, (char *)&termbuf2.sg, + if (memcmp((void *)&termbuf.sg, (void *)&termbuf2.sg, sizeof(termbuf.sg))) (void) ioctl(pty, TIOCSETN, (char *)&termbuf.sg); - if (memcmp((char *)&termbuf.tc, (char *)&termbuf2.tc, + if (memcmp((void *)&termbuf.tc, (void *)&termbuf2.tc, sizeof(termbuf.tc))) (void) ioctl(pty, TIOCSETC, (char *)&termbuf.tc); - if (memcmp((char *)&termbuf.ltc, (char *)&termbuf2.ltc, + if (memcmp((void *)&termbuf.ltc, (void *)&termbuf2.ltc, sizeof(termbuf.ltc))) (void) ioctl(pty, TIOCSLTC, (char *)&termbuf.ltc); if (termbuf.lflags != termbuf2.lflags) (void) ioctl(pty, TIOCLSET, (char *)&termbuf.lflags); #else /* USE_TERMIO */ - if (memcmp((char *)&termbuf, (char *)&termbuf2, sizeof(termbuf))) + if (memcmp((void *)&termbuf, (void *)&termbuf2, sizeof(termbuf))) # ifdef STREAMSPTY (void) tcsetattr(ttyfd, TCSANOW, &termbuf); # else @@ -1150,7 +1150,7 @@ getptyslave() init_termbuf(); # ifdef TIOCGWINSZ if (def_row || def_col) { - memset((char *)&ws, 0, sizeof(ws)); + memset((void *)&ws, 0, sizeof(ws)); ws.ws_col = def_col; ws.ws_row = def_row; (void)ioctl(t, TIOCSWINSZ, (char *)&ws); @@ -1475,7 +1475,7 @@ startslave(host, autologin, autoname) (void) sprintf(tbuf, "Can't open %s\n", INIT_FIFO); fatalperror(net, tbuf); } - memset((char *)&request, 0, sizeof(request)); + memset((void *)&request, 0, sizeof(request)); request.magic = INIT_MAGIC; SCPYN(request.gen_id, gen_id); SCPYN(request.tty_id, &line[8]); @@ -1579,7 +1579,7 @@ start_login(host, autologin, name) * Create utmp entry for child */ - memset(&utmpx, 0, sizeof(utmpx)); + memset((void *)&utmpx, 0, sizeof(utmpx)); SCPYN(utmpx.ut_user, ".telnet"); SCPYN(utmpx.ut_line, line + sizeof("/dev/") - 1); utmpx.ut_pid = pid; diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index 1312d429587..577e1a6727f 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: telnetd.c,v 1.9 1998/03/25 18:43:49 art Exp $ */ +/* $OpenBSD: telnetd.c,v 1.10 1998/04/25 04:43:03 millert Exp $ */ /* $NetBSD: telnetd.c,v 1.6 1996/03/20 04:25:57 tls Exp $ */ /* @@ -45,7 +45,7 @@ static char copyright[] = static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: telnetd.c,v 1.5 1996/02/28 20:38:23 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: telnetd.c,v 1.9 1998/03/25 18:43:49 art Exp $"; +static char rcsid[] = "$OpenBSD: telnetd.c,v 1.10 1998/04/25 04:43:03 millert Exp $"; #endif #endif /* not lint */ @@ -467,7 +467,7 @@ main(argc, argv) int szi = sizeof(int); #endif /* SO_SEC_MULTI */ - memset((char *)&dv, 0, sizeof(dv)); + memset((void *)&dv, 0, sizeof(dv)); if (getsysv(&sysv, sizeof(struct sysv)) != 0) { perror("getsysv"); @@ -655,7 +655,7 @@ getterminaltype(name) static unsigned char sb[] = { IAC, SB, TELOPT_TSPEED, TELQUAL_SEND, IAC, SE }; - memmove(nfrontp, sb, sizeof sb); + memmove((void *)nfrontp, (void *)sb, sizeof sb); nfrontp += sizeof sb; DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); } @@ -663,7 +663,7 @@ getterminaltype(name) static unsigned char sb[] = { IAC, SB, TELOPT_XDISPLOC, TELQUAL_SEND, IAC, SE }; - memmove(nfrontp, sb, sizeof sb); + memmove((void *)nfrontp, (void *)sb, sizeof sb); nfrontp += sizeof sb; DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); } @@ -671,7 +671,7 @@ getterminaltype(name) static unsigned char sb[] = { IAC, SB, TELOPT_NEW_ENVIRON, TELQUAL_SEND, IAC, SE }; - memmove(nfrontp, sb, sizeof sb); + memmove((void *)nfrontp, (void *)sb, sizeof sb); nfrontp += sizeof sb; DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); } @@ -679,13 +679,13 @@ getterminaltype(name) static unsigned char sb[] = { IAC, SB, TELOPT_OLD_ENVIRON, TELQUAL_SEND, IAC, SE }; - memmove(nfrontp, sb, sizeof sb); + memmove((void *)nfrontp, (void *)sb, sizeof sb); nfrontp += sizeof sb; DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); } if (his_state_is_will(TELOPT_TTYPE)) { - memmove(nfrontp, ttytype_sbbuf, sizeof ttytype_sbbuf); + memmove((void *)nfrontp, (void *)ttytype_sbbuf, sizeof ttytype_sbbuf); nfrontp += sizeof ttytype_sbbuf; DIAG(TD_OPTIONS, printsub('>', ttytype_sbbuf + 2, sizeof ttytype_sbbuf - 2);); @@ -765,7 +765,7 @@ _gettermname() if (his_state_is_wont(TELOPT_TTYPE)) return; settimer(baseline); - memmove(nfrontp, ttytype_sbbuf, sizeof ttytype_sbbuf); + memmove((void *)nfrontp, (void *)ttytype_sbbuf, sizeof ttytype_sbbuf); nfrontp += sizeof ttytype_sbbuf; DIAG(TD_OPTIONS, printsub('>', ttytype_sbbuf + 2, sizeof ttytype_sbbuf - 2);); diff --git a/libexec/telnetd/termstat.c b/libexec/telnetd/termstat.c index 9ab2f76e079..b196114e606 100644 --- a/libexec/telnetd/termstat.c +++ b/libexec/telnetd/termstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: termstat.c,v 1.3 1996/12/23 13:12:54 robin Exp $ */ +/* $OpenBSD: termstat.c,v 1.4 1998/04/25 04:43:04 millert Exp $ */ /* $NetBSD: termstat.c,v 1.5 1996/02/28 20:38:27 thorpej Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)termstat.c 8.2 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: termstat.c,v 1.5 1996/02/28 20:38:27 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: termstat.c,v 1.3 1996/12/23 13:12:54 robin Exp $"; +static char rcsid[] = "$OpenBSD: termstat.c,v 1.4 1998/04/25 04:43:04 millert Exp $"; #endif #endif /* not lint */ @@ -621,7 +621,7 @@ defer_terminit() if (def_col || def_row) { struct winsize ws; - memset((char *)&ws, 0, sizeof(ws)); + memset((void *)&ws, 0, sizeof(ws)); ws.ws_col = def_col; ws.ws_row = def_row; (void) ioctl(pty, TIOCSWINSZ, (char *)&ws); diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c index 65df58691f0..68801fd4cb6 100644 --- a/libexec/telnetd/utility.c +++ b/libexec/telnetd/utility.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utility.c,v 1.11 1998/03/25 18:43:50 art Exp $ */ +/* $OpenBSD: utility.c,v 1.12 1998/04/25 04:43:05 millert Exp $ */ /* $NetBSD: utility.c,v 1.9 1996/02/28 20:38:29 thorpej Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: utility.c,v 1.9 1996/02/28 20:38:29 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: utility.c,v 1.11 1998/03/25 18:43:50 art Exp $"; +static char rcsid[] = "$OpenBSD: utility.c,v 1.12 1998/04/25 04:43:05 millert Exp $"; #endif #endif /* not lint */ @@ -108,7 +108,7 @@ stilloob(s) do { FD_ZERO(&excepts); FD_SET(s, &excepts); - memset((char *)&timeout, 0, sizeof timeout); + memset((void *)&timeout, 0, sizeof timeout); value = select(s+1, (fd_set *)0, (fd_set *)0, &excepts, &timeout); } while ((value == -1) && (errno == EINTR)); @@ -235,7 +235,7 @@ netclear() next = nextitem(next); } while (wewant(next) && (nfrontp > next)); length = next-thisitem; - memmove(good, thisitem, length); + memmove((void *)good, (void *)thisitem, length); good += length; thisitem = next; } else { @@ -342,7 +342,7 @@ writenet(ptr, len) netflush(); } - memmove(nfrontp, ptr, len); + memmove((void *)nfrontp, (void *)ptr, len); nfrontp += len; } /* end of writenet */ |