aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Huber <[email protected]>2016-05-11 21:28:33 +0200
committerBrian Behlendorf <[email protected]>2016-05-12 12:36:28 -0700
commit20c901dc7a96a5f156d28bfb26d9f82026a4fcfb (patch)
tree05d2dd1d3c3dc024257b376e56fbc1d2d633b5f5
parent04bc461062df8e272aa11268668140c2976ac823 (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
-rw-r--r--lib/libzfs/libzfs_import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c
index 25f369db9..99c3d9998 100644
--- a/lib/libzfs/libzfs_import.c
+++ b/lib/libzfs/libzfs_import.c
@@ -599,7 +599,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;