summaryrefslogtreecommitdiffstats
path: root/lib/libpcap/pcap.c
diff options
context:
space:
mode:
authorlteo <lteo@openbsd.org>2015-01-16 03:19:57 +0000
committerlteo <lteo@openbsd.org>2015-01-16 03:19:57 +0000
commit1b8dcd42e689e6f9a3568339cefb3dfb6453a1a9 (patch)
tree33963c255bb25ad0d86328a527624ededb695b09 /lib/libpcap/pcap.c
parentThe BPF paper referenced in the SEE ALSO section was most likely an unpublished (diff)
downloadwireguard-openbsd-1b8dcd42e689e6f9a3568339cefb3dfb6453a1a9.tar.xz
wireguard-openbsd-1b8dcd42e689e6f9a3568339cefb3dfb6453a1a9.zip
Remove pointless casts for several malloc/calloc/free calls. No object
file change.
Diffstat (limited to 'lib/libpcap/pcap.c')
-rw-r--r--lib/libpcap/pcap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpcap/pcap.c b/lib/libpcap/pcap.c
index 6757e769ab0..2dd70d123b2 100644
--- a/lib/libpcap/pcap.c
+++ b/lib/libpcap/pcap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcap.c,v 1.15 2014/06/26 04:03:33 lteo Exp $ */
+/* $OpenBSD: pcap.c,v 1.16 2015/01/16 03:19:57 lteo Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
@@ -256,7 +256,7 @@ pcap_list_datalinks(pcap_t *p, int **dlt_buffer)
* DLT for an interface. Return a list of DLTs
* containing only the DLT this device supports.
*/
- *dlt_buffer = (int*)malloc(sizeof(**dlt_buffer));
+ *dlt_buffer = malloc(sizeof(**dlt_buffer));
if (*dlt_buffer == NULL) {
(void)snprintf(p->errbuf, sizeof(p->errbuf),
"malloc: %s", pcap_strerror(errno));