mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-28 17:39:23 +03:00
More consistent use of TREE_* macros in AVL comparators
Where is it appropriate and obvious, use TREE_CMP(), TREE_ISIGN() and TREE_PCMP() instead or direct comparisons. It can make the code a lot smaller, less error prone, and easier to read. Sponsored-by: TrueNAS Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@truenas.com> Closes #18259
This commit is contained in:
@@ -84,11 +84,8 @@ domain_compare(const void *arg1, const void *arg2)
|
||||
{
|
||||
const fuid_domain_t *node1 = (const fuid_domain_t *)arg1;
|
||||
const fuid_domain_t *node2 = (const fuid_domain_t *)arg2;
|
||||
int val;
|
||||
|
||||
val = strcmp(node1->f_ksid->kd_name, node2->f_ksid->kd_name);
|
||||
|
||||
return (TREE_ISIGN(val));
|
||||
return (TREE_ISIGN(strcmp(node1->f_ksid->kd_name,
|
||||
node2->f_ksid->kd_name)));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user