All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Mike Grant <mggr@pml.ac.uk>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] xfs_repair: reformat lines to fit within 80 characters
Date: Fri, 19 Jun 2015 09:40:10 -0400	[thread overview]
Message-ID: <20150619134009.GE12833@bfoster.bfoster> (raw)
In-Reply-To: <1434705696-21705-2-git-send-email-mggr@pml.ac.uk>

On Fri, Jun 19, 2015 at 10:21:35AM +0100, Mike Grant wrote:
> Signed-off-by: Mike Grant <mggr@pml.ac.uk>
> ---
>  repair/phase6.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/repair/phase6.c b/repair/phase6.c
> index 105bce4..0d66f9c 100644
> --- a/repair/phase6.c
> +++ b/repair/phase6.c
> @@ -2327,9 +2327,11 @@ longform_dir2_entry_check(xfs_mount_t	*mp,
>  		if (db >= num_bps) {
>  			/* more data blocks than expected */
>  			num_bps = db + 1;
> -			bplist = realloc(bplist, num_bps * sizeof(struct xfs_buf*));
> +			bplist = realloc(bplist, num_bps *
> +				sizeof(struct xfs_buf*));

We usually try to align the split lines based on the "scope" within the
previous lines, for lack of a better term. For example, the above would
look something like this:

			bplist = realloc(bplist, num_bps *
					 sizeof(struct xfs_buf*));

... which is a bit easier to read at a glance. Anyways, Dave may or may
not pull this one and fix it up manually, but it's fine to me with the
above fix:

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  			if (!bplist)
> -				do_error(_("realloc failed in %s (%zu bytes)\n"),
> +				do_error(
> +					_("realloc failed in %s (%zu bytes)\n"),
>  					__func__,
>  					num_bps * sizeof(struct xfs_buf*));
>  		}
> -- 
> 2.1.0
> 
> (apologies for the following junk forcibly appended by my company)
> 
> 
> Please visit our new website at www.pml.ac.uk and follow us on Twitter  @PlymouthMarine
> 
> Winner of the Environment & Conservation category, the Charity Awards 2014.
> 
> Plymouth Marine Laboratory (PML) is a company limited by guarantee registered in England & Wales, company number 4178503. Registered Charity No. 1091222. Registered Office: Prospect Place, The Hoe, Plymouth  PL1 3DH, UK. 
> 
> This message is private and confidential. If you have received this message in error, please notify the sender and remove it from your system. You are reminded that e-mail communications are not secure and may contain viruses; PML accepts no liability for any loss or damage which may be caused by viruses.
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-06-19 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  9:21 [PATCH 0/2] xfs_repair: clear new memory after realloc Mike Grant
2015-06-19  9:21 ` [PATCH 1/2] xfs_repair: reformat lines to fit within 80 characters Mike Grant
2015-06-19 13:40   ` Brian Foster [this message]
2015-06-19  9:21 ` [PATCH 2/2] xfs_repair: clear new memory after realloc Mike Grant
2015-06-19 13:40   ` Brian Foster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150619134009.GE12833@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=mggr@pml.ac.uk \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.