summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-16 10:20:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-16 10:20:26 +0000
commitddd90c76e150f88ffb1a64f591dcefee8afa1f56 (patch)
tree8c3d9e4cfa977602595508e735c6af8e91dbaf98 /ext/socket
parent94a1bece4a4adb5c0f8f09fb9b95356bae24912b (diff)
exception name on -d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/socket.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 5aaff22c04..d35e029f34 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -541,10 +541,8 @@ static VALUE
tcp_s_open(class, host, serv)
VALUE class, host, serv;
{
- VALUE s;
Check_SafeStr(host);
- s = open_inet(class, host, serv, INET_CLIENT);
- return s;
+ return open_inet(class, host, serv, INET_CLIENT);
}
#ifdef SOCKS
@@ -553,7 +551,6 @@ socks_s_open(class, host, serv)
VALUE class, host, serv;
{
static init = 0;
- VALUE s;
if (init == 0) {
SOCKSinit("ruby");
@@ -561,8 +558,7 @@ socks_s_open(class, host, serv)
}
Check_SafeStr(host);
- s = open_inet(class, host, serv, INET_SOCKS);
- return s;
+ return open_inet(class, host, serv, INET_SOCKS);
}
#endif
@@ -572,13 +568,12 @@ tcp_svr_s_open(argc, argv, class)
VALUE *argv;
VALUE class;
{
- VALUE arg1, arg2, s;
+ VALUE arg1, arg2;
if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2)
- s = open_inet(class, arg1, arg2, INET_SERVER);
+ return open_inet(class, arg1, arg2, INET_SERVER);
else
- s = open_inet(class, 0, arg1, INET_SERVER);
- return s;
+ return open_inet(class, 0, arg1, INET_SERVER);
}
static VALUE
@@ -807,10 +802,7 @@ static VALUE
udp_s_open(class)
VALUE class;
{
- VALUE s;
-
- s = sock_new(class, socket(AF_INET, SOCK_DGRAM, 0));
- return s;
+ return sock_new(class, socket(AF_INET, SOCK_DGRAM, 0));
}
static void
@@ -953,9 +945,7 @@ static VALUE
unix_s_sock_open(sock, path)
VALUE sock, path;
{
- VALUE s;
- s = open_unix(sock, path, 0);
- return s;
+ return open_unix(sock, path, 0);
}
static VALUE
@@ -979,9 +969,7 @@ static VALUE
unix_svr_s_open(sock, path)
VALUE sock, path;
{
- VALUE s;
- s = open_unix(sock, path, 1);
- return s;
+ return open_unix(sock, path, 1);
}
static VALUE