syntax lint

This commit is contained in:
HappyZ 2016-10-02 00:02:32 -07:00
parent 7f7f19e7c9
commit ae9f934425
1 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ int main(int argc, char *argv[])
// Get the index of the interface to receive from
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)
{
fprintf(stderr, "! SIOCGIFFLAGS error. Check permission.\n");
@ -129,7 +129,7 @@ int main(int argc, char *argv[])
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");
close(sockfd);
exit(EXIT_FAILURE);