coverity complains about logically dead code for the statement if (error) because
error was assigned to 0 prior to the check. I believe error was meant to get the
return status of the call vnet_punt_socket_add.
Change-Id: I794167493f63cb898d3618c2c28817823f46b765
Signed-off-by: Steven Luong <sluong@cisco.com>
clib_error_t *error;
vl_api_registration_t *reg;
- error = 0;
- vnet_punt_socket_add (vm, ntohl (mp->header_version),
- mp->punt.ipv, mp->punt.l4_protocol,
- ntohs (mp->punt.l4_port), (char *) mp->pathname);
+ error = vnet_punt_socket_add (vm, ntohl (mp->header_version),
+ mp->punt.ipv, mp->punt.l4_protocol,
+ ntohs (mp->punt.l4_port),
+ (char *) mp->pathname);
if (error)
{
rv = -1;