summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kvm_mkdb/nlist.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-08-20 22:39:29 +0000
committerderaadt <deraadt@openbsd.org>2015-08-20 22:39:29 +0000
commit35de856ed2be5e6bd284466437ecec8c238ee751 (patch)
tree52317c381e559008ce133dcf7b89f7ed3ce53858 /usr.sbin/kvm_mkdb/nlist.c
parentDo not cast result of malloc/calloc/realloc* if stdlib.h is in scope (diff)
downloadwireguard-openbsd-35de856ed2be5e6bd284466437ecec8c238ee751.tar.xz
wireguard-openbsd-35de856ed2be5e6bd284466437ecec8c238ee751.zip
stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw
Diffstat (limited to 'usr.sbin/kvm_mkdb/nlist.c')
-rw-r--r--usr.sbin/kvm_mkdb/nlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/kvm_mkdb/nlist.c b/usr.sbin/kvm_mkdb/nlist.c
index e2f534f7458..ed325d95368 100644
--- a/usr.sbin/kvm_mkdb/nlist.c
+++ b/usr.sbin/kvm_mkdb/nlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nlist.c,v 1.47 2015/01/18 04:48:24 deraadt Exp $ */
+/* $OpenBSD: nlist.c,v 1.48 2015/08/20 22:39:29 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -87,7 +87,7 @@ __elf_knlist(int fd, DB *db, int ksyms)
!IS_ELF(eh))
return (1);
- sh = (Elf_Shdr *)calloc(sizeof(Elf_Shdr), eh.e_shnum);
+ sh = calloc(sizeof(Elf_Shdr), eh.e_shnum);
if (sh == NULL)
errx(1, "cannot allocate %zu bytes for symbol header",
sizeof(Elf_Shdr) * eh.e_shnum);