diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 17:10:47 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 17:10:47 +0000 |
commit | cdca4e19d0274e86e128ae9dc61291fb13b18763 (patch) | |
tree | 83c9ba8af0f7f19675a8fda7a4765055090cc8d8 | |
parent | e5dd6a792d974d8d8d9f81c21102a4c1f527926b (diff) | |
download | ruby-cdca4e19d0274e86e128ae9dc61291fb13b18763.tar.gz |
* ext/socket/option.c (inspect_timeval): fix the size test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/socket/option.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Mon Feb 23 02:10:09 2009 Tanaka Akira <akr@fsij.org> + + * ext/socket/option.c (inspect_timeval): fix the size test. + Sun Feb 22 22:42:20 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (tr_trans): should recalculate coderange. diff --git a/ext/socket/option.c b/ext/socket/option.c index 5563a7d8bb..7d62d73ff5 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -305,7 +305,7 @@ inspect_socktype(int level, int optname, VALUE data, VALUE ret) static int inspect_timeval(int level, int optname, VALUE data, VALUE ret) { - if (RSTRING_LEN(data) == sizeof(struct linger)) { + if (RSTRING_LEN(data) == sizeof(struct timeval)) { struct timeval s; memcpy((char*)&s, RSTRING_PTR(data), sizeof(s)); rb_str_catf(ret, " %ld.%06ldsec", (long)s.tv_sec, (long)s.tv_usec); |