ruby-changes:1774
From: ko1@a...
Date: 25 Aug 2007 15:20:58 +0900
Subject: [ruby-changes:1774] nobu - Ruby:r13265 (trunk): * io.c (swallow): removed condition using an unset variable.
nobu 2007-08-25 15:20:48 +0900 (Sat, 25 Aug 2007)
New Revision: 13265
Modified files:
trunk/ChangeLog
trunk/io.c
Log:
* io.c (swallow): removed condition using an unset variable.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13265&r2=13264
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=13265&r2=13264
Index: ChangeLog
===================================================================
--- ChangeLog (revision 13264)
+++ ChangeLog (revision 13265)
@@ -1,3 +1,7 @@
+Sat Aug 25 15:20:46 2007 Nobuyoshi Nakada <nobu@r...>
+
+ * io.c (swallow): removed condition using an unset variable.
+
Sat Aug 25 11:45:37 2007 Yukihiro Matsumoto <matz@r...>
* encoding.c: provide basic features for M17N.
Index: io.c
===================================================================
--- io.c (revision 13264)
+++ io.c (revision 13265)
@@ -18,6 +18,10 @@
#include <ctype.h>
#include <errno.h>
+#if defined(DOSISH) || defined(__CYGWIN__)
+#include <io.h>
+#endif
+
#include <sys/types.h>
#if !defined(_WIN32) && !defined(__DJGPP__)
# if defined(__BEOS__)
@@ -1616,8 +1620,6 @@
static inline int
swallow(rb_io_t *fptr, int term)
{
- int c;
-
do {
long cnt;
while ((cnt = READ_DATA_PENDING_COUNT(fptr)) > 0) {
@@ -1633,10 +1635,7 @@
}
rb_thread_wait_fd(fptr->fd);
rb_io_check_closed(fptr);
- if (io_fillbuf(fptr) < 0) {
- break;
- }
- } while (c != EOF);
+ } while (io_fillbuf(fptr) == 0);
return Qfalse;
}
@@ -4435,7 +4434,10 @@
int fr = rb_sysopen(fn, O_RDONLY, 0);
if (ruby_inplace_mode) {
- struct stat st, st2;
+ struct stat st;
+#ifndef NO_SAFE_RENAME
+ struct stat st2;
+#endif
VALUE str;
int fw;
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml