Pour compatibilite avec le compacteur: toujours passer par le buffer

pour les ecritures.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1997-05-14 12:01:00 +00:00
parent 278de83311
commit 7db3802115
1 changed files with 1 additions and 6 deletions

View File

@ -213,12 +213,7 @@ int putblock(channel, p, len)
n = len >= INT_MAX ? INT_MAX : (int) len;
free = channel->end - channel->curr;
if (channel->curr == channel->buff && n >= free) {
/* Empty buffer and big write request: bypass the buffer. */
written = do_write(channel->fd, p, n);
channel->offset += written;
return written;
} else if (n <= free) {
if (n <= free) {
/* Write request small enough to fit in buffer: transfer to buffer. */
bcopy(p, channel->curr, n);
channel->curr += n;