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 <marcelhuberfoo@gmail.com> Signed-off-by: Chunwei Chen <tuxoko@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #4632
This commit is contained in:
parent
d30abebc85
commit
9a6fcfd47d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue