projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warnings found by GCC 4.9.
[tinc]
/
src
/
raw_socket_device.c
diff --git
a/src/raw_socket_device.c
b/src/raw_socket_device.c
index
b9671e3
..
c61e43c
100644
(file)
--- a/
src/raw_socket_device.c
+++ b/
src/raw_socket_device.c
@@
-32,12
+32,12
@@
#include "route.h"
#include "xalloc.h"
#include "route.h"
#include "xalloc.h"
+#if defined(PF_PACKET) && defined(ETH_P_ALL) && defined(AF_PACKET) && defined(SIOCGIFINDEX)
static char *device_info;
static uint64_t device_total_in = 0;
static uint64_t device_total_out = 0;
static char *device_info;
static uint64_t device_total_in = 0;
static uint64_t device_total_out = 0;
-#if defined(PF_SOCKET) && defined(ETH_P_ALL) && defined(AF_PACKET)
static bool setup_device(void) {
struct ifreq ifr;
struct sockaddr_ll sa;
static bool setup_device(void) {
struct ifreq ifr;
struct sockaddr_ll sa;
@@
-69,7
+69,7
@@
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;