diff options
Diffstat (limited to 'libqpdf/Pl_StdioFile.cc')
-rw-r--r-- | libqpdf/Pl_StdioFile.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libqpdf/Pl_StdioFile.cc b/libqpdf/Pl_StdioFile.cc index f19a84d5..e4b96a9e 100644 --- a/libqpdf/Pl_StdioFile.cc +++ b/libqpdf/Pl_StdioFile.cc @@ -31,17 +31,17 @@ Pl_StdioFile::write(unsigned char* buf, size_t len) size_t so_far = 0; while (len > 0) { - so_far = fwrite(buf, 1, len, this->m->file); - if (so_far == 0) - { - QUtil::throw_system_error( - this->identifier + ": Pl_StdioFile::write"); - } - else - { - buf += so_far; - len -= so_far; - } + so_far = fwrite(buf, 1, len, this->m->file); + if (so_far == 0) + { + QUtil::throw_system_error( + this->identifier + ": Pl_StdioFile::write"); + } + else + { + buf += so_far; + len -= so_far; + } } } @@ -51,8 +51,8 @@ Pl_StdioFile::finish() if ((fflush(this->m->file) == -1) && (errno == EBADF)) { - throw std::logic_error( - this->identifier + - ": Pl_StdioFile::finish: stream already closed"); + throw std::logic_error( + this->identifier + + ": Pl_StdioFile::finish: stream already closed"); } } |