summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump/print-tcp.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:39:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:39:31 +0000
commitaa0cb4643fc13729e7874a5eb16e9eecd90c1ced (patch)
tree1b6337f56b8a55bfda6bab69525fe62675d14e0e /usr.sbin/tcpdump/print-tcp.c
parent6e5d9523d6273368df6377a4db98a9533d11505c (diff)
stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw
Diffstat (limited to 'usr.sbin/tcpdump/print-tcp.c')
-rw-r--r--usr.sbin/tcpdump/print-tcp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-tcp.c b/usr.sbin/tcpdump/print-tcp.c
index 96730025ad7..9e41bf803e1 100644
--- a/usr.sbin/tcpdump/print-tcp.c
+++ b/usr.sbin/tcpdump/print-tcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-tcp.c,v 1.32 2015/01/16 06:40:21 deraadt Exp $ */
+/* $OpenBSD: print-tcp.c,v 1.33 2015/08/20 22:39:29 deraadt Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -392,8 +392,7 @@ tcp_print(register const u_char *bp, register u_int length,
if (!th->nxt || flags & TH_SYN) {
/* didn't find it or new conversation */
if (th->nxt == NULL) {
- th->nxt = (struct tcp_seq_hash *)
- calloc(1, sizeof(*th));
+ th->nxt = calloc(1, sizeof(*th));
if (th->nxt == NULL)
error("tcp_print: calloc");
}