[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] fport_write: Fix test of remaining bytes.
From: |
Doug Evans |
Subject: |
[PATCH] fport_write: Fix test of remaining bytes. |
Date: |
Sat, 28 Mar 2015 13:59:32 -0700 |
Hi.
This seems obvious, but I could be missing something.
2015-03-28 Doug Evans <address@hidden>
* libguile/fports.c (fport_write): Fix test of remaining bytes.
diff --git a/libguile/fports.c b/libguile/fports.c
index 8395f0e..ce1bf54 100644
--- a/libguile/fports.c
+++ b/libguile/fports.c
@@ -869,7 +869,7 @@ fport_write (SCM port, const void *data, size_t size)
const void *ptr = ((const char *) data) + space;
size_t remaining = size - space;
- if (size >= pt->write_buf_size)
+ if (remaining >= pt->write_buf_size)
{
if (full_write (SCM_FPORT_FDES (port), ptr, remaining)
< remaining)
- [PATCH] fport_write: Fix test of remaining bytes.,
Doug Evans <=