changeset 20204:44f91b648e03

(fullwrite): Get rid of an extra call to write. Problem pointed out by Chiaki Ishikawa.
author Karl Heuer <kwzh@gnu.org>
date Fri, 31 Oct 1997 23:09:43 +0000
parents f1a4588c8075
children cdaddfc03fe8
files lib-src/pop.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/pop.c	Fri Oct 31 23:03:30 1997 +0000
+++ b/lib-src/pop.c	Fri Oct 31 23:09:43 1997 +0000
@@ -1410,10 +1410,10 @@
      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;