syntax lint
This commit is contained in:
parent
7f7f19e7c9
commit
ae9f934425
|
|
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
// Get the index of the interface to receive from
|
// Get the index of the interface to receive from
|
||||||
memset(&ifopts, 0, sizeof(struct ifreq));
|
memset(&ifopts, 0, sizeof(struct ifreq));
|
||||||
strncpy(ifopts.ifr_name, ifName, IFNAMSIZ-1);
|
strncpy(ifopts.ifr_name, ifName, IFNAMSIZ - 1);
|
||||||
if (ioctl(sockfd, SIOCGIFFLAGS, &ifopts) < 0)
|
if (ioctl(sockfd, SIOCGIFFLAGS, &ifopts) < 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "! SIOCGIFFLAGS error. Check permission.\n");
|
fprintf(stderr, "! SIOCGIFFLAGS error. Check permission.\n");
|
||||||
|
|
@ -129,7 +129,7 @@ int main(int argc, char *argv[])
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, ifName, IFNAMSIZ-1) == -1) {
|
if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, ifName, IFNAMSIZ - 1) == -1) {
|
||||||
fprintf(stderr, "! SO_BINDTODEVICE error. \n");
|
fprintf(stderr, "! SO_BINDTODEVICE error. \n");
|
||||||
close(sockfd);
|
close(sockfd);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue