Skip to content

Commit 4325edd

Browse files
author
Chris Mason
committed
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 <[email protected]>
1 parent 9c10640 commit 4325edd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/ctree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
11751175
struct tree_mod_elem *tm;
11761176
struct extent_buffer *eb;
11771177
struct tree_mod_root *old_root = NULL;
1178-
u64 old_generation;
1178+
u64 old_generation = 0;
11791179
u64 logical;
11801180

11811181
eb = btrfs_read_lock_root_node(root);

0 commit comments

Comments
 (0)