summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/svc_tcp.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-09-01 17:31:39 +0000
committerderaadt <deraadt@openbsd.org>2015-09-01 17:31:39 +0000
commit2ecea7747e57f9acf05ee2421c06434ac876263a (patch)
tree9c2878a97ffae3ef539acbfb401e611a00c862bb /lib/libc/rpc/svc_tcp.c
parentKill unused ``ia_net'' field in the struct in6_ifaddr, bad copy (diff)
downloadwireguard-openbsd-2ecea7747e57f9acf05ee2421c06434ac876263a.tar.xz
wireguard-openbsd-2ecea7747e57f9acf05ee2421c06434ac876263a.zip
Remove calls to perror(); the error returns are sufficient, and these
library may not assume stderr is useable. ok millert miod beck
Diffstat (limited to 'lib/libc/rpc/svc_tcp.c')
-rw-r--r--lib/libc/rpc/svc_tcp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c
index efe4795e4d2..f30911d23dc 100644
--- a/lib/libc/rpc/svc_tcp.c
+++ b/lib/libc/rpc/svc_tcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svc_tcp.c,v 1.33 2014/10/25 03:18:58 lteo Exp $ */
+/* $OpenBSD: svc_tcp.c,v 1.34 2015/09/01 17:31:39 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -134,10 +134,8 @@ svctcp_create(int sock, u_int sendsize, u_int recvsize)
socklen_t len = sizeof(struct sockaddr_in);
if (sock == RPC_ANYSOCK) {
- if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
- perror("svctcp_.c - udp socket creation problem");
+ if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
return (NULL);
- }
madesock = TRUE;
}
memset(&addr, 0, sizeof (addr));
@@ -149,7 +147,6 @@ svctcp_create(int sock, u_int sendsize, u_int recvsize)
}
if ((getsockname(sock, (struct sockaddr *)&addr, &len) != 0) ||
(listen(sock, 2) != 0)) {
- perror("svctcp_.c - cannot getsockname or listen");
if (madesock)
(void)close(sock);
return (NULL);