Skip to content

Commit

Permalink
Fixes bug in fix_paths()
Browse files Browse the repository at this point in the history
Fixes bug introduced in commit 7d90f569a.  Hinted by gcc:

libzfs_import.c: In function ‘fix_paths’:
libzfs_import.c:602:28: warning: self-comparison always evaluates to true [-Wtautological-compare]
    if (best->ne_num_labels == best->ne_num_labels &&

Signed-off-by: Marcel Huber <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#4632
  • Loading branch information
marcelhuberfoo authored and nedbass committed Sep 5, 2016
1 parent d30abeb commit 9a6fcfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libzfs/libzfs_import.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ fix_paths(nvlist_t *nv, name_entry_t *names)
}

/* Prefer paths earlier in the search order. */
if (best->ne_num_labels == best->ne_num_labels &&
if (ne->ne_num_labels == best->ne_num_labels &&
ne->ne_order < best->ne_order) {
best = ne;
continue;
Expand Down

0 comments on commit 9a6fcfd

Please sign in to comment.