misc: fix sonarclound warnings

Type: fix
Ticket: VPP-1888
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I9c2fb926a5e010658088a74051c8c3462ff61734
This commit is contained in:
Dave Barach
2020-06-16 08:40:53 -04:00
committed by Dave Wallace
parent cea46522e7
commit 1af730d0df
3 changed files with 11 additions and 2 deletions

View File

@@ -123,6 +123,12 @@ api_dns_resolve_name (vat_main_t * vam)
break;
}
if (name == 0)
{
errmsg ("missing name to resolve");
return -99;
}
if (vec_len (name) > 127)
{
errmsg ("name too long");