Skip to content

Commit

Permalink
fixes bug introduced in commit #7d90f569
Browse files Browse the repository at this point in the history
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 &&
                                ^~
  • Loading branch information
marcelhuberfoo committed May 11, 2016
1 parent 7f231f0 commit 6028dcd
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 @@ -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;
Expand Down

0 comments on commit 6028dcd

Please sign in to comment.