Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/telnetd fix wrong variable check, remove casts
details: https://anonhg.NetBSD.org/src/rev/ea8b9e49ed63
branches: trunk
changeset: 787700:ea8b9e49ed63
user: christos <christos%NetBSD.org@localhost>
date: Fri Jun 28 15:48:02 2013 +0000
description:
fix wrong variable check, remove casts
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html
diffstat:
libexec/telnetd/sys_term.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 4981d918846d -r ea8b9e49ed63 libexec/telnetd/sys_term.c
--- a/libexec/telnetd/sys_term.c Fri Jun 28 15:46:37 2013 +0000
+++ b/libexec/telnetd/sys_term.c Fri Jun 28 15:48:02 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_term.c,v 1.46 2012/11/04 21:57:40 christos Exp $ */
+/* $NetBSD: sys_term.c,v 1.47 2013/06/28 15:48:02 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: sys_term.c,v 1.46 2012/11/04 21:57:40 christos Exp $");
+__RCSID("$NetBSD: sys_term.c,v 1.47 2013/06/28 15:48:02 christos Exp $");
#endif
#endif /* not lint */
@@ -690,7 +690,7 @@
/*
* 10 entries, a leading length, and a null
*/
- argv = (char **)malloc(sizeof(*argv) * 12);
+ argv = malloc(sizeof(*argv) * 12);
if (argv == NULL)
return(NULL);
*argv++ = (char *)10;
@@ -700,9 +700,8 @@
;
if (cpp == &argv[(long)argv[-1]]) {
--argv;
- nargv = (char **)realloc(argv,
- sizeof(*argv) * ((long)(*argv) + 10 + 2));
- if (argv == NULL) {
+ nargv = realloc(argv, sizeof(*argv) * ((long)(*argv) + 10 + 2));
+ if (nargv == NULL) {
fatal(net, "not enough memory");
/*NOTREACHED*/
}
Home |
Main Index |
Thread Index |
Old Index