Fix compiler warnings for release builds

This commit is contained in:
Tony Kuker 2021-04-05 12:14:51 -05:00
parent 877a7a129c
commit e68f6f09e2

View File

@ -66,7 +66,7 @@ static BOOL br_setif(int br_socket_fd, const char* bridgename, const char* ifnam
static BOOL ip_link(int fd, const char* ifname, BOOL up) {
struct ifreq ifr;
int err;
strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
strncpy(ifr.ifr_name, ifname, IFNAMSIZ-1); // Need to save room for null terminator
err = ioctl(fd, SIOCGIFFLAGS, &ifr);
if (err) {
LOGERROR("Error: can't ioctl SIOCGIFFLAGS. Errno: %d %s", errno, strerror(errno));
@ -262,7 +262,7 @@ BOOL FASTCALL CTapDriver::OpenDump(const Filepath& path) {
LOGERROR("Error: can't open pcap file: %s", pcap_geterr(m_pcap));
return FALSE;
}
LOGTRACE("%s Opened %s for dumping", __PRETTY_FUNCTION__, path.GetPath())
LOGTRACE("%s Opened %s for dumping", __PRETTY_FUNCTION__, path.GetPath());
return TRUE;
}