misc: vppctl - fix coverity warning

Check the return value and log failure in case send() fails.

Type: fix
Fixes: 31f1924346
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I1809598ff4816f67c28a88264b6524b10d7ff6ce
This commit is contained in:
Klement Sekera
2021-11-16 12:22:25 +01:00
committed by Andrew Yourtchenko
parent 8b7e8ae97c
commit 89a4978afd

View File

@ -58,7 +58,10 @@ send_ttype (int sock_fd, int is_interactive)
"%c%s"
"%c%c",
IAC, SB, TELOPT_TTYPE, 0, term, IAC, SE);
send (sock_fd, buf, len, 0);
if (send (sock_fd, buf, len, 0) < 0)
{
perror ("send_ttype");
}
}
static void