Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/telnet remove casts
details: https://anonhg.NetBSD.org/src/rev/91275db956a3
branches: trunk
changeset: 770189:91275db956a3
user: christos <christos%NetBSD.org@localhost>
date: Fri Oct 07 16:30:17 2011 +0000
description:
remove casts
diffstat:
usr.bin/telnet/telnet.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diffs (43 lines):
diff -r 77d1cd111c14 -r 91275db956a3 usr.bin/telnet/telnet.c
--- a/usr.bin/telnet/telnet.c Fri Oct 07 16:29:40 2011 +0000
+++ b/usr.bin/telnet/telnet.c Fri Oct 07 16:30:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: telnet.c,v 1.33 2011/10/07 10:14:22 joerg Exp $ */
+/* $NetBSD: telnet.c,v 1.34 2011/10/07 16:30:17 christos Exp $ */
/*
* Copyright (c) 1988, 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)telnet.c 8.4 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: telnet.c,v 1.33 2011/10/07 10:14:22 joerg Exp $");
+__RCSID("$NetBSD: telnet.c,v 1.34 2011/10/07 16:30:17 christos Exp $");
#endif
#endif /* not lint */
@@ -755,20 +755,18 @@
char *ext_tc, *newptr;
size_t len;
- if ((termbuf = (char *) malloc(1024)) == NULL)
+ if ((termbuf = malloc(1024)) == NULL)
goto error;
if (tgetent(termbuf, tname) == 1) {
- /* check for ZZ capability, which indicates termcap truncated */
+ /* check for ZZ capability, indicating termcap truncated */
zz_ptr = zz;
if (tgetstr("ZZ", &zz_ptr) != NULL) {
- /* it was, fish back the full termcap */
+ /* it was, fish back the full termcap */
sscanf(zz, "%p", &ext_tc);
len = strlen(ext_tc) + 1;
- if ((newptr = (char *) realloc(termbuf, len))
- == NULL) {
+ if ((newptr = realloc(termbuf, len)) == NULL)
goto error;
- }
memcpy(newptr, ext_tc, len);
termbuf = newptr;
Home |
Main Index |
Thread Index |
Old Index