]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests 285: Fix indentation of do_pwrite
authorJan Kara <jack@suse.cz>
Fri, 31 May 2013 12:19:47 +0000 (07:19 -0500)
committerRich Johnston <rjohnston@sgi.com>
Fri, 31 May 2013 12:19:47 +0000 (07:19 -0500)
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
src/seek_sanity_test.c

index eec690360d444a7c9d56ad82d9e6169ed49d446a..748eec2284440dbc6538897a06b863ce67b66bfd 100644 (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;
-
-       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;
+       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;
+       }
+
+       return 0;
 }
 
 #define do_close(x)    do { if ((x) > -1) close(x); } while(0);