moved unsied files, compiles w/o waringins with clang

FossilOrigin-Name: 1189a474bfcc28195d888d7967ccfc50c812f194e1ee19e99d3cb244d666a19a
This commit is contained in:
7u83@mail.ru
2018-03-25 08:07:39 +00:00
parent c1f1d91b28
commit 847781bf7c
70 changed files with 130 additions and 492 deletions

View File

@ -36,11 +36,12 @@ int sock_getifinfo(const struct sockaddr *addr, char *ifname, struct sockaddr *b
struct sockaddr *netmask)
{
struct ifaddrs *ifap, *ifa;
int rc;
if (getifaddrs(&ifap) == -1)
return 0;
int rc = 0;
rc = 0;
for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
if (sock_cmpaddr(addr, ifa->ifa_addr, 0))
@ -56,7 +57,7 @@ int sock_getifinfo(const struct sockaddr *addr, char *ifname, struct sockaddr *b
sock_addrlen(ifa->ifa_netmask));
}
if (ifname)
strcpy(ifname, ifa->ifa_name); //, strlen(ifa->ifa_name));
strcpy(ifname, ifa->ifa_name); /*, strlen(ifa->ifa_name));*/
rc = 1;
break;