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:
Marcel Huber 2016-05-11 21:28:33 +02:00 committed by Ned Bass
parent d30abebc85
commit 9a6fcfd47d
1 changed files with 1 additions and 1 deletions

View File

@ -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;