cleanups: unnecessary casts, unified const_1, eliminate cross-.c file
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED", removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
This commit is contained in:
@@ -112,7 +112,7 @@ int listen_socket(uint32_t ip, int port, char *inf)
|
||||
}
|
||||
|
||||
strncpy(interface.ifr_name, inf, IFNAMSIZ);
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&interface, sizeof(interface)) < 0) {
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &interface, sizeof(interface)) < 0) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user