summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1997-10-31 23:09:43 +0000
committerKarl Heuer <kwzh@gnu.org>1997-10-31 23:09:43 +0000
commitf3553a1fe90ae3e179ff95bab45ee3f587d304b1 (patch)
tree7bf80e726790514b0b65747030340befd9b7aa80 /lib-src
parent7be62b49f347378cc1ed4d40a2382ffbe75a82bf (diff)
downloademacs-f3553a1fe90ae3e179ff95bab45ee3f587d304b1.tar.gz
(fullwrite): Get rid of an extra call to write. Problem
pointed out by Chiaki Ishikawa.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/pop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c
index d1b39927738..16823baa1d4 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -1410,10 +1410,10 @@ fullwrite (fd, buf, nbytes)
int nbytes;
{
char *cp;
- int ret;
+ int ret = 0;
cp = buf;
- while ((ret = SEND (fd, cp, nbytes, 0)) > 0)
+ while (nbytes && ((ret = SEND (fd, cp, nbytes, 0)) > 0))
{
cp += ret;
nbytes -= ret;