aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/ancdata.c3
-rw-r--r--ext/socket/unixsocket.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 880f79cf17..b58e03c712 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -262,8 +262,7 @@ ancillary_unix_rights(VALUE self)
if (level != SOL_SOCKET || type != SCM_RIGHTS)
rb_raise(rb_eTypeError, "SCM_RIGHTS ancillary data expected");
- VALUE v = rb_attr_get(self, rb_intern("unix_rights"));
- return v;
+ return rb_attr_get(self, rb_intern("unix_rights"));
}
#else
#define ancillary_unix_rights rb_f_notimplement
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index 6bdaa94620..82893abcfe 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -472,9 +472,9 @@ static VALUE
unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
{
VALUE domain, type, protocol;
- domain = INT2FIX(PF_UNIX);
VALUE args[3];
+ domain = INT2FIX(PF_UNIX);
rb_scan_args(argc, argv, "02", &type, &protocol);
if (argc == 0)
type = INT2FIX(SOCK_STREAM);