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

ruby-changes:7962

From: usa <ko1@a...>
Date: Tue, 23 Sep 2008 19:40:29 +0900 (JST)
Subject: [ruby-changes:7962] Ruby:r19484 (trunk): * win32/win32.c (subtruct): check tv_sec. reported by ko1.

usa	2008-09-23 19:39:21 +0900 (Tue, 23 Sep 2008)

  New Revision: 19484

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

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

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19483)
+++ ChangeLog	(revision 19484)
@@ -1,3 +1,7 @@
+Tue Sep 23 19:38:03 2008  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (subtruct): check tv_sec. reported by ko1.
+
 Tue Sep 23 19:21:03 2008  Tadayoshi Funaba  <tadf@d...>
 
 	* complex.c (nucomp_s_canonicalize_internal): does no apply
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 19483)
+++ win32/win32.c	(revision 19484)
@@ -2157,6 +2157,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/

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