xfstests 285: Fix indentation of do_pwrite

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Jan Kara
2013-05-31 07:19:47 -05:00
committed by Rich Johnston
parent 9267afb16b
commit 1515c26fd4
+11 -11
View File
@@ -120,19 +120,19 @@ static int do_sync_dirty_pages(int fd, off64_t offset, off64_t nbytes)
static ssize_t do_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
ssize_t ret, written = 0;
ssize_t ret, written = 0;
while (count > written) {
ret = pwrite(fd, buf + written, count - written, offset + written);
if (ret < 0) {
fprintf(stderr, " ERROR %d: Failed to write %ld "
"bytes\n", errno, (long)count);
return ret;
}
written += ret;
}
while (count > written) {
ret = pwrite(fd, buf + written, count - written, offset + written);
if (ret < 0) {
fprintf(stderr, " ERROR %d: Failed to write %ld "
"bytes\n", errno, (long)count);
return ret;
}
written += ret;
}
return 0;
return 0;
}
#define do_close(x) do { if ((x) > -1) close(x); } while(0);