On 5/24/22 14:32, Markus Armbruster wrote:
+ * @provider: stats provider
Argument documentation that merely paraphrases the type is redundant.
May I have a proper contract?
"stats provider matched against QMP command arguments"?
+static bool stats_provider_requested(StatsProvider provider,
+ StatsFilter *filter)
+{
+ StatsRequestList *request;
+
+ if (!filter->has_providers) {
+ return true;
+ }
+ for (request = filter->providers; request; request = request->next) {
+ if (request->value->provider == provider) {
+ return true;
+ }
+ }
+ return false;
+}
+
This is just like apply_str_list_filter(). Good! Could we make the two
names similar, too?
It looks similar but there is a difference in patch 7, in that it also
returns the "names" filter. I can rename it to
find_stats_provider_filter() if you prefer.
All other suggestions applied, thanks.
Paolo