From e309253fc8a0454a12d708789e0ecaa9237562ba Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 18 Oct 2020 18:11:08 +0200
Subject: [PATCH] clang-format
---
src/adapters/net.cpp | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/adapters/net.cpp b/src/adapters/net.cpp
index ffc8f441..5fd5499c 100644
--- a/src/adapters/net.cpp
+++ b/src/adapters/net.cpp
@@ -1,7 +1,5 @@
#include "adapters/net.hpp"
-#include
-
#include
#include
#include
@@ -12,6 +10,8 @@
#include
#include
+#include
+
#include "common.hpp"
#include "settings.hpp"
#include "utils/command.hpp"
@@ -88,18 +88,18 @@ namespace net {
char ip6_buffer[INET6_ADDRSTRLEN];
sa6 = reinterpret_cast(ifa->ifa_addr);
if (IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr)) {
- continue;
+ continue;
}
if (IN6_IS_ADDR_SITELOCAL(&sa6->sin6_addr)) {
- continue;
+ continue;
}
if ((((unsigned char*)sa6->sin6_addr.s6_addr)[0] & 0xFE) == 0xFC) {
- /* Skip Unique Local Addresses (fc00::/7) */
- continue;
+ /* Skip Unique Local Addresses (fc00::/7) */
+ continue;
}
if (inet_ntop(AF_INET6, &sa6->sin6_addr, ip6_buffer, INET6_ADDRSTRLEN) == 0) {
- m_log.warn("inet_ntop() " + string(strerror(errno)));
- continue;
+ m_log.warn("inet_ntop() " + string(strerror(errno)));
+ continue;
}
m_status.ip6 = string{ip6_buffer};
break;
@@ -209,7 +209,6 @@ namespace net {
if (strncmp(driver.driver, "bridge", 6) == 0) {
m_bridge = true;
}
-
}
/**
@@ -257,7 +256,7 @@ namespace net {
return true;
}
- if(m_bridge) {
+ if (m_bridge) {
/* If bridge network then link speed cannot be computed
* TODO: Identify the physical network in bridge and compute the link speed
*/
@@ -309,7 +308,9 @@ namespace net {
* about the current connection
*/
string wired_network::linkspeed() const {
- return m_linkspeed == -1 ? "N/A" : (m_linkspeed < 1000 ? (to_string(m_linkspeed) + " Mbit/s") : (to_string(m_linkspeed / 1000) + " Gbit/s"));
+ return m_linkspeed == -1 ? "N/A"
+ : (m_linkspeed < 1000 ? (to_string(m_linkspeed) + " Mbit/s")
+ : (to_string(m_linkspeed / 1000) + " Gbit/s"));
}
// }}}