Mercurial > emacs
comparison lib-src/pop.c @ 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 | 83050d7e3f64 |
children | 7e1538a45702 |
comparison
equal
deleted
inserted
replaced
20203:f1a4588c8075 | 20204:44f91b648e03 |
---|---|
1408 int fd; | 1408 int fd; |
1409 char *buf; | 1409 char *buf; |
1410 int nbytes; | 1410 int nbytes; |
1411 { | 1411 { |
1412 char *cp; | 1412 char *cp; |
1413 int ret; | 1413 int ret = 0; |
1414 | 1414 |
1415 cp = buf; | 1415 cp = buf; |
1416 while ((ret = SEND (fd, cp, nbytes, 0)) > 0) | 1416 while (nbytes && ((ret = SEND (fd, cp, nbytes, 0)) > 0)) |
1417 { | 1417 { |
1418 cp += ret; | 1418 cp += ret; |
1419 nbytes -= ret; | 1419 nbytes -= ret; |
1420 } | 1420 } |
1421 | 1421 |