From 638fb14169ad96cf9bc0dd5f61460daaecee5bb1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 24 Apr 2014 15:44:17 +0200 Subject: net: Make qmp_query_rx_filter() with name argument more obvious With a client name, the QMP command is specified to return a list of one element. This isn't locally obvious in the code. Make it so. Signed-off-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi --- net/net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/net.c b/net/net.c index bc9ed6def0..ccb354aee8 100644 --- a/net/net.c +++ b/net/net.c @@ -1066,6 +1066,10 @@ RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name, " rx-filter querying", name); break; } + + if (has_name) { + break; + } } if (filter_list == NULL && !error_is_set(errp) && has_name) { -- cgit v1.2.3