public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Dan Carpenter <error27@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [patch] unreached code in ctree.c
Date: Fri, 27 Mar 2009 08:47:59 -0400	[thread overview]
Message-ID: <1238158079.27455.5.camel@think.oraclecorp.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0903270733320.5354@usbsys.site>

On Fri, 2009-03-27 at 13:33 +0300, Dan Carpenter wrote:
> Smatch (http://repo.or.cz/w/smatch.git/) complains about this unreachable 
> code so I moved the break; up a line.  Compile tested.
> 
> regards,
> dan carpenter
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> --- orig/fs/btrfs/ctree.c	2009-03-27 07:31:42.000000000 +0300
> +++ devel/fs/btrfs/ctree.c	2009-03-27 07:32:26.000000000 +0300
> @@ -3318,8 +3318,8 @@
>  	for (i = 0; i < nr; i++) {
>  		if (total_size + data_size[i] + sizeof(struct btrfs_item) >
>  		    BTRFS_LEAF_DATA_SIZE(root)) {
> -			break;
>  			nr = i;
> +			break;
>  		}

Whoops, that's not good.  This whole function is actually unused after
the changes in the experimental tree.

-chris



      reply	other threads:[~2009-03-27 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 10:33 [patch] unreached code in ctree.c Dan Carpenter
2009-03-27 12:47 ` Chris Mason [this message]

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=1238158079.27455.5.camel@think.oraclecorp.com \
    --to=chris.mason@oracle.com \
    --cc=error27@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox