فهرست منبع

Btrfs: init old_generation in get_old_root

gcc was giving an uninit variable warning here.  Strictly
speaking we don't need to init it, but this will make things
much less error prone.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Chris Mason 13 سال پیش
والد
کامیت
4325edd078
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      fs/btrfs/ctree.c

+ 1 - 1
fs/btrfs/ctree.c

@@ -1175,7 +1175,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
 	struct tree_mod_elem *tm;
 	struct tree_mod_elem *tm;
 	struct extent_buffer *eb;
 	struct extent_buffer *eb;
 	struct tree_mod_root *old_root = NULL;
 	struct tree_mod_root *old_root = NULL;
-	u64 old_generation;
+	u64 old_generation = 0;
 	u64 logical;
 	u64 logical;
 
 
 	eb = btrfs_read_lock_root_node(root);
 	eb = btrfs_read_lock_root_node(root);