diff options
-rw-r--r-- | lib/Handle.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index 1941254..50e7bee 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -39,9 +39,11 @@ int Handle::GetHandle() const { return h; } -ssize_t Handle::write(const void *buf, size_t count) throw (GeneralException) { +ssize_t Handle::write(const void *cbuf, size_t count) throw (GeneralException) { ssize_t r, tr = 0; bool done, full = false; + const char * buf = (const char *)cbuf; + do { done = true; @@ -75,7 +77,7 @@ ssize_t Handle::write(const void *buf, size_t count) throw (GeneralException) { return r; } full = done = false; - ((char *)buf) += r; + buf += r; tr += r; } } while (!done); |