Commit 9d3f4cee authored by Karl Heuer's avatar Karl Heuer

(fullwrite): Get rid of an extra call to write. Problem

pointed out by Chiaki Ishikawa.
parent 2ed2806c
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment