summaryrefslogtreecommitdiff
path: root/lib/socket/interfaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/socket/interfaces.c')
-rw-r--r--lib/socket/interfaces.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/socket/interfaces.c b/lib/socket/interfaces.c
index 847fa6255ba..2cabf46316b 100644
--- a/lib/socket/interfaces.c
+++ b/lib/socket/interfaces.c
@@ -189,7 +189,6 @@ static int _get_interfaces(TALLOC_CTX *mem_ctx, struct iface_struct **pifaces)
int count;
int total = 0;
size_t copy_size;
- uint64_t if_speed = 1000 * 1000 * 1000; /* 1GBit */
if (getifaddrs(&iflist) < 0) {
return -1;
@@ -214,6 +213,7 @@ static int _get_interfaces(TALLOC_CTX *mem_ctx, struct iface_struct **pifaces)
/* Loop through interfaces, looking for given IP address */
for (ifptr = iflist; ifptr != NULL; ifptr = ifptr->ifa_next) {
+ uint64_t if_speed = 1000 * 1000 * 1000; /* 1Gbps */
if (!ifptr->ifa_addr || !ifptr->ifa_netmask) {
continue;