diff options
-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); |