diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-25 15:13:16 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-25 15:13:16 +0000 |
| commit | 7d09d4867f685c671e570df1453e688cc70d6aca (patch) | |
| tree | 44f6e7ddb8698aa942a48d6168cfd6d5fb27285c /io.c | |
| parent | ac89f742b01ee8cc4af7c52905a9683d49c82099 (diff) | |
| download | ruby-7d09d4867f685c671e570df1453e688cc70d6aca.tar.gz ruby-7d09d4867f685c671e570df1453e688cc70d6aca.tar.xz ruby-7d09d4867f685c671e570df1453e688cc70d6aca.zip | |
* io.c (rb_fopen, rb_fdopen, rb_io_reopen): setvbuf() may return
positive value on failure. [ruby-dev:23792]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2381,7 +2381,7 @@ rb_fopen(fname, mode) } } #ifdef USE_SETVBUF - if (setvbuf(file, NULL, _IOFBF, 0) < 0) + if (setvbuf(file, NULL, _IOFBF, 0) != 0) rb_warn("setvbuf() can't be honoured for %s", fname); #endif #ifdef __human68k__ @@ -2424,7 +2424,7 @@ rb_fdopen(fd, mode) } #ifdef USE_SETVBUF - if (setvbuf(file, NULL, _IOFBF, 0) < 0) + if (setvbuf(file, NULL, _IOFBF, 0) != 0) rb_warn("setvbuf() can't be honoured (fd=%d)", fd); #endif return file; @@ -3278,7 +3278,7 @@ rb_io_reopen(argc, argv, file) rb_sys_fail(fptr->path); } #ifdef USE_SETVBUF - if (setvbuf(fptr->f, NULL, _IOFBF, 0) < 0) + if (setvbuf(fptr->f, NULL, _IOFBF, 0) != 0) rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr); #endif |
