BIND 10 trac826, updated. 823eafb896e27af8428e09c2a8b430a1aae85973 [trac826] fix src/lib/util/io/fd.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Sun Oct 16 18:59:59 UTC 2011
The branch, trac826 has been updated
via 823eafb896e27af8428e09c2a8b430a1aae85973 (commit)
from 3c0970a506f66aac77b77b73fd159181ec9db079 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 823eafb896e27af8428e09c2a8b430a1aae85973
Author: Francis Dupont <fdupont at isc.org>
Date: Sun Oct 16 20:59:36 2011 +0200
[trac826] fix src/lib/util/io/fd.cc
-----------------------------------------------------------------------
Summary of changes:
src/lib/util/io/fd.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/io/fd.cc b/src/lib/util/io/fd.cc
index f77b8ea..6b22803 100644
--- a/src/lib/util/io/fd.cc
+++ b/src/lib/util/io/fd.cc
@@ -33,7 +33,7 @@ write_data(const int fd, const void *buffer_v, const size_t length) {
// Just keep writing until all is written
while (rest) {
ssize_t written(write(fd, buffer, rest));
- if (rest == -1) {
+ if (written == -1) {
if (errno == EINTR) { // Just keep going
continue;
} else {
@@ -53,13 +53,13 @@ read_data(const int fd, void *buffer_v, const size_t length) {
size_t rest(length), already(0);
while (rest) { // Stil something to read
ssize_t amount(read(fd, buffer, rest));
- if (rest == -1) {
+ if (amount == -1) {
if (errno == EINTR) { // Continue on interrupted call
continue;
} else {
return -1;
}
- } else if (amount) {
+ } else if (amount != 0) {
already += amount;
rest -= amount;
buffer += amount;
More information about the bind10-changes
mailing list