Skip to content

Commit

Permalink
Btrfs: fix uninit warning in backref.c
Browse files Browse the repository at this point in the history
Added initialization with the declaration of ret. It isn't set later on the
switch-default branch (which should never be taken).

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Jan Schmidt authored and Chris Mason committed Jan 26, 2012
1 parent 96bdc7d commit b1375d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/backref.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static int __add_delayed_refs(struct btrfs_delayed_ref_head *head, u64 seq,
struct btrfs_delayed_extent_op *extent_op = head->extent_op;
struct rb_node *n = &head->node.rb_node;
int sgn;
int ret;
int ret = 0;

if (extent_op && extent_op->update_key)
btrfs_disk_key_to_cpu(info_key, &extent_op->key);
Expand Down Expand Up @@ -392,7 +392,7 @@ static int __add_inline_refs(struct btrfs_fs_info *fs_info,
struct btrfs_key *info_key, int *info_level,
struct list_head *prefs)
{
int ret;
int ret = 0;
int slot;
struct extent_buffer *leaf;
struct btrfs_key key;
Expand Down

0 comments on commit b1375d6

Please sign in to comment.