diff options
author | Marcel Huber <[email protected]> | 2016-05-11 21:28:33 +0200 |
---|---|---|
committer | Ned Bass <[email protected]> | 2016-09-05 16:07:08 -0700 |
commit | 9a6fcfd47df8bbb6567afa23092fe577d3080b77 (patch) | |
tree | 4be77a45ed5b3bdd2f8465a8dd48c997583684dc /lib | |
parent | d30abebc8520ceae9dac7ef275dc4151022d2fe1 (diff) |
Fixes bug in fix_paths()
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 #4632
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index e40f6f694..d0df9e3c2 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -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; |