summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 08:27:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 08:27:41 +0000
commit009ad25fdd60c3d3067f881dbce706735bb5b6fd (patch)
treea524ea88dd36f1f7692b8c1181f07ea25ab377fb /ext
parent7454eab7013e276282c9bc282b149242b891b334 (diff)
* ext/socket/socket.c (setup_domain_and_type): initialize ptr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 8b306197338..4bf7fc02170 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -2293,7 +2293,8 @@ setup_domain_and_type(VALUE domain, int *dv, VALUE type, int *tv)
int family;
domain = tmp;
rb_check_safe_obj(domain);
- family = family_to_int(RSTRING_PTR(domain), RSTRING_LEN(domain));
+ ptr = RSTRING_PTR(domain);
+ family = family_to_int(ptr, RSTRING_LEN(domain));
if (family == -1)
rb_raise(rb_eSocket, "unknown socket domain %s", ptr);
*dv = family;