mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Split boilerplate and platform-independent field comparison
This acheives two things: - Allows for simple tie-breaking if values compare equal (needed to make sorting the tree-view stable) - Allows for platform-dependent overriding of the sort-order for specific fields Also fixes a small oversight on DragonFlyBSD when default-sorting.
This commit is contained in:
@ -142,7 +142,7 @@ long SolarisProcess_compareByKey(const void* v1, const void* v2, ProcessField ke
|
||||
case LWPID:
|
||||
return SPACESHIP_NUMBER(p1->lwpid, p2->lwpid);
|
||||
default:
|
||||
return SPACESHIP_NUMBER(v1->pid, v2->pid);
|
||||
return Process_compareByKey_Base(v1, v2, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user