# HG changeset patch # User Karl Heuer # Date 878339383 0 # Node ID 44f91b648e0388530c9c65c50f8493cc749dedc4 # Parent f1a4588c8075cfc22dba8fd10c0d4e97434490be (fullwrite): Get rid of an extra call to write. Problem pointed out by Chiaki Ishikawa. diff -r f1a4588c8075 -r 44f91b648e03 lib-src/pop.c --- 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;