[前][次][番号順一覧][スレッド一覧]

ruby-changes:7964

From: usa <ko1@a...>
Date: Tue, 23 Sep 2008 19:50:52 +0900 (JST)
Subject: [ruby-changes:7964] Ruby:r19486 (ruby_1_8): * win32/win32.c (subtruct): check tv_sec.

usa	2008-09-23 19:50:42 +0900 (Tue, 23 Sep 2008)

  New Revision: 19486

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19486

  Log:
    * win32/win32.c (subtruct): check tv_sec.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/win32/win32.c

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 19485)
+++ ruby_1_8/ChangeLog	(revision 19486)
@@ -1,3 +1,7 @@
+Tue Sep 23 19:50:24 2008  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (subtruct): check tv_sec.
+
 Tue Sep 23 19:30:41 2008  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (filetime_to_timeval): new function, split from
Index: ruby_1_8/win32/win32.c
===================================================================
--- ruby_1_8/win32/win32.c	(revision 19485)
+++ ruby_1_8/win32/win32.c	(revision 19486)
@@ -2172,6 +2172,9 @@
 static inline int
 subtract(struct timeval *rest, const struct timeval *wait)
 {
+    if (rest->tv_sec < wait->tv_sec) {
+	return 0;
+    }
     while (rest->tv_usec < wait->tv_usec) {
 	if (rest->tv_sec <= wait->tv_sec) {
 	    return 0;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]