summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/clireadwrite.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/libcli/clireadwrite.c b/source4/libcli/clireadwrite.c
index ae2367918c..7d8f34a428 100644
--- a/source4/libcli/clireadwrite.c
+++ b/source4/libcli/clireadwrite.c
@@ -105,8 +105,8 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
parms.writex.in.file.fnum = fnum;
parms.writex.in.wmode = write_mode;
parms.writex.in.remaining = 0;
-
- while (total < size) {
+
+ do {
NTSTATUS status;
block = MIN(block, size - total);
@@ -124,7 +124,7 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
offset += parms.writex.out.nwritten;
total += parms.writex.out.nwritten;
buf += parms.writex.out.nwritten;
- }
+ } while (total < size);
return total;
}