api: Fold the empty pool check into the main macro 70/30970/2
authorNeale Ranns <neale@graphiant.com>
Thu, 28 Jan 2021 11:38:16 +0000 (11:38 +0000)
committerOle Tr�an <otroan@employees.org>
Thu, 4 Feb 2021 14:25:52 +0000 (14:25 +0000)
Type: improvement

the empty pool chekc is always required, so make it alwayd happen.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3879e752036a7dd49fff7e16dc6d9ea02563aa7a

src/plugins/map/map_api.c

index bcc0c27..f81216d 100644 (file)
@@ -152,12 +152,6 @@ vl_api_map_domains_get_t_handler (vl_api_map_domains_get_t * mp)
 
   i32 rv = 0;
 
-  if (pool_elts (mm->domains) == 0)
-    {
-      REPLY_MACRO (VL_API_MAP_DOMAINS_GET_REPLY);
-      return;
-    }
-
   /* *INDENT-OFF* */
   REPLY_AND_DETAILS_MACRO (VL_API_MAP_DOMAINS_GET_REPLY, mm->domains,
   ({