mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Improve the DynamicMeter_search API to make 'key' optional
Thanks to @BenBE for the suggestion.
This commit is contained in:
@ -52,7 +52,8 @@ bool DynamicMeter_search(Hashtable* dynamics, const char* name, unsigned int* ke
|
||||
DynamicIterator iter = { .key = 0, .name = name, .found = false };
|
||||
if (dynamics)
|
||||
Hashtable_foreach(dynamics, DynamicMeter_compare, &iter);
|
||||
*key = iter.key;
|
||||
if (key)
|
||||
*key = iter.key;
|
||||
return iter.found;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user