aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-21 09:10:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-21 09:10:23 +0000
commit87af442f946da3b5ab3bc8fb351824ec8c240fe7 (patch)
tree792f75b9f15c0da49ecf99a8512ccd5581f59733 /ext/socket
parentc6b6293bc13b9107cad52f407810cddc4dd0b475 (diff)
downloadruby-87af442f946da3b5ab3bc8fb351824ec8c240fe7.tar.gz
* suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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);