summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlteo <lteo@openbsd.org>2014-03-14 03:45:41 +0000
committerlteo <lteo@openbsd.org>2014-03-14 03:45:41 +0000
commit66cf3f763b9e16c4f738abc6d7ee84b2faccebbf (patch)
tree69b52548ccd8d105d93344831186b8c043a60973 /lib
parentChange a few malloc+memset calls to calloc. (diff)
downloadwireguard-openbsd-66cf3f763b9e16c4f738abc6d7ee84b2faccebbf.tar.xz
wireguard-openbsd-66cf3f763b9e16c4f738abc6d7ee84b2faccebbf.zip
Remove pointless casts. No binary change.
suggested by krw@
Diffstat (limited to 'lib')
-rw-r--r--lib/libpcap/gencode.c4
-rw-r--r--lib/libpcap/savefile.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c
index 2b62858ba44..b4ecc0b9f2b 100644
--- a/lib/libpcap/gencode.c
+++ b/lib/libpcap/gencode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gencode.c,v 1.37 2014/03/14 03:44:13 lteo Exp $ */
+/* $OpenBSD: gencode.c,v 1.38 2014/03/14 03:45:41 lteo Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
@@ -191,7 +191,7 @@ newchunk(n)
if (k >= NCHUNKS)
bpf_error("out of memory");
size = CHUNK0SIZE << k;
- cp->m = (void *)calloc(1, size);
+ cp->m = calloc(1, size);
if (cp->m == NULL)
bpf_error("out of memory");
diff --git a/lib/libpcap/savefile.c b/lib/libpcap/savefile.c
index 1411081f258..5c3bff9dc77 100644
--- a/lib/libpcap/savefile.c
+++ b/lib/libpcap/savefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: savefile.c,v 1.11 2014/03/14 03:44:13 lteo Exp $ */
+/* $OpenBSD: savefile.c,v 1.12 2014/03/14 03:45:41 lteo Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996, 1997
@@ -129,7 +129,7 @@ pcap_fopen_offline(FILE *fp, char *errbuf)
struct pcap_file_header hdr;
int linklen;
- p = (pcap_t *)calloc(1, sizeof(*p));
+ p = calloc(1, sizeof(*p));
if (p == NULL) {
strlcpy(errbuf, "out of swap", PCAP_ERRBUF_SIZE);
return (NULL);