summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sftp-server.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-08-20 22:32:41 +0000
committerderaadt <deraadt@openbsd.org>2015-08-20 22:32:41 +0000
commitcfff592fdcba7224e5205351c52ccbbf732bea06 (patch)
tree8d24eab6ee00bea4a036548904169d14055574dd /usr.bin/ssh/sftp-server.c
parentDo not need to cast malloc(). stdlib.h is brought in via a local .h file. (diff)
downloadwireguard-openbsd-cfff592fdcba7224e5205351c52ccbbf732bea06.tar.xz
wireguard-openbsd-cfff592fdcba7224e5205351c52ccbbf732bea06.zip
Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert
Diffstat (limited to 'usr.bin/ssh/sftp-server.c')
-rw-r--r--usr.bin/ssh/sftp-server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c
index 075e7b2ae22..e0ad3e33f44 100644
--- a/usr.bin/ssh/sftp-server.c
+++ b/usr.bin/ssh/sftp-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.106 2015/04/24 01:36:01 deraadt Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.107 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
*
@@ -1585,8 +1585,8 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
fatal("%s: sshbuf_new failed", __func__);
set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
- rset = (fd_set *)xmalloc(set_size);
- wset = (fd_set *)xmalloc(set_size);
+ rset = xmalloc(set_size);
+ wset = xmalloc(set_size);
if (homedir != NULL) {
if (chdir(homedir) != 0) {