after log error, reset errno
This commit is contained in:
@@ -214,6 +214,8 @@ struct traffic_mirror_ethdev * traffic_mirror_ethdev_pcap_create(const char * st
|
||||
if(fd < 0)
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "failed at create socket: %s", strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@@ -223,6 +225,8 @@ struct traffic_mirror_ethdev * traffic_mirror_ethdev_pcap_create(const char * st
|
||||
if(ioctl(fd, SIOCGIFHWADDR, &if_req) < 0)
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "failed at read hwaddr of device %s: %s", str_ethdev, strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@@ -238,6 +242,8 @@ struct traffic_mirror_ethdev * traffic_mirror_ethdev_pcap_create(const char * st
|
||||
if (ioctl(fd, SIOCGIFMTU, &if_req) < 0)
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "failed at read mtu of device %s: %s", str_ethdev, strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user