xfs
[Top] [All Lists]

Re: [PATCH 2/3 v2] 285: Fix indentation of do_pwrite

To: Jan Kara <jack@xxxxxxx>
Subject: Re: [PATCH 2/3 v2] 285: Fix indentation of do_pwrite
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 30 May 2013 16:25:11 -0500
Cc: xfs@xxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1369948905-6693-2-git-send-email-jack@xxxxxxx>
References: <1369948905-6693-1-git-send-email-jack@xxxxxxx> <1369948905-6693-2-git-send-email-jack@xxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
On 5/30/13 4:21 PM, Jan Kara wrote:
> Signed-off-by: Jan Kara <jack@xxxxxxx>
> ---
>  src/seek_sanity_test.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)

mmm, whitespace.

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> diff --git a/src/seek_sanity_test.c b/src/seek_sanity_test.c
> index eec6903..748eec2 100644
> --- a/src/seek_sanity_test.c
> +++ b/src/seek_sanity_test.c
> @@ -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);
> 

<Prev in Thread] Current Thread [Next in Thread>