projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert sizeof foo to sizeof(foo).
[tinc]
/
src
/
raw_socket_device.c
diff --git
a/src/raw_socket_device.c
b/src/raw_socket_device.c
index
eb38be2
..
18fbdde
100644
(file)
--- a/
src/raw_socket_device.c
+++ b/
src/raw_socket_device.c
@@
-53,7
+53,7
@@
static bool setup_device(void) {
return false;
}
return false;
}
- memset(&ifr, 0, sizeof
ifr
);
+ memset(&ifr, 0, sizeof
(ifr)
);
#ifdef FD_CLOEXEC
fcntl(device_fd, F_SETFD, FD_CLOEXEC);
#ifdef FD_CLOEXEC
fcntl(device_fd, F_SETFD, FD_CLOEXEC);
@@
-67,12
+67,12
@@
static bool setup_device(void) {
return false;
}
return false;
}
- memset(&sa, '0', sizeof
sa
);
+ memset(&sa, '0', sizeof
(sa)
);
sa.sll_family = AF_PACKET;
sa.sll_protocol = htons(ETH_P_ALL);
sa.sll_ifindex = ifr.ifr_ifindex;
sa.sll_family = AF_PACKET;
sa.sll_protocol = htons(ETH_P_ALL);
sa.sll_ifindex = ifr.ifr_ifindex;
- if(bind(device_fd, (struct sockaddr *) &sa, (socklen_t) sizeof
sa
)) {
+ if(bind(device_fd, (struct sockaddr *) &sa, (socklen_t) sizeof
(sa)
)) {
logger(DEBUG_ALWAYS, LOG_ERR, "Could not bind %s to %s: %s", device, iface, strerror(errno));
return false;
}
logger(DEBUG_ALWAYS, LOG_ERR, "Could not bind %s to %s: %s", device, iface, strerror(errno));
return false;
}