summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sasyncd/sasyncd.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/sasyncd/sasyncd.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/sasyncd/sasyncd.c')
-rw-r--r--usr.sbin/sasyncd/sasyncd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sasyncd/sasyncd.c b/usr.sbin/sasyncd/sasyncd.c
index 0efefe182a9..ac17dca53b8 100644
--- a/usr.sbin/sasyncd/sasyncd.c
+++ b/usr.sbin/sasyncd/sasyncd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sasyncd.c,v 1.23 2012/04/14 12:11:08 haesbaert Exp $ */
+/* $OpenBSD: sasyncd.c,v 1.24 2015/08/20 22:39:29 deraadt Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
@@ -63,13 +63,13 @@ sasyncd_run(pid_t ppid)
n = getdtablesize();
fdsetsize = howmany(n, NFDBITS) * sizeof(fd_mask);
- rfds = (fd_set *)malloc(fdsetsize);
+ rfds = malloc(fdsetsize);
if (!rfds) {
log_err("malloc(%lu) failed", (unsigned long)fdsetsize);
return -1;
}
- wfds = (fd_set *)malloc(fdsetsize);
+ wfds = malloc(fdsetsize);
if (!wfds) {
log_err("malloc(%lu) failed", (unsigned long)fdsetsize);
free(rfds);