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 | 1ad4c3be05ff6018821af7a4465e98d0228879da (patch) | |
| tree | 83c9ba8af0f7f19675a8fda7a4765055090cc8d8 | |
| parent | c678363c28113f2ddea921c49a619f0e32e052fd (diff) | |
| download | ruby-1ad4c3be05ff6018821af7a4465e98d0228879da.tar.gz ruby-1ad4c3be05ff6018821af7a4465e98d0228879da.tar.xz ruby-1ad4c3be05ff6018821af7a4465e98d0228879da.zip | |
* ext/socket/option.c (inspect_timeval): fix the size test.
git-svn-id: http://svn.ruby-lang.org/repos/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 5563a7d8b..7d62d73ff 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); |
