summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--interface.c12
-rw-r--r--iprule.c2
-rw-r--r--system-linux.c12
-rw-r--r--system.h14
-rw-r--r--ubus.c9
5 files changed, 23 insertions, 26 deletions
diff --git a/interface.c b/interface.c
index a014111..522e7fe 100644
--- a/interface.c
+++ b/interface.c
@@ -94,11 +94,11 @@ interface_error_flush(struct interface *iface)
static void
interface_clear_errors(struct interface *iface)
{
- /* don't flush the errors in case the configured protocol handler matches the
+ /* don't flush the errors in case the configured protocol handler matches the
running protocol handler and is having the last error capability */
if (!(iface->proto &&
- (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) &&
- (iface->proto->handler->name == iface->proto_handler->name)))
+ (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) &&
+ (iface->proto->handler->name == iface->proto_handler->name)))
interface_error_flush(iface);
}
@@ -110,12 +110,12 @@ void interface_add_error(struct interface *iface, const char *subsystem,
int *datalen = NULL;
char *dest, *d_subsys, *d_code;
- /* if the configured protocol handler has the last error support capability,
+ /* if the configured protocol handler has the last error support capability,
errors should only be added if the running protocol handler matches the
configured one */
if (iface->proto &&
- (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) &&
- (iface->proto->handler->name != iface->proto_handler->name))
+ (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) &&
+ (iface->proto->handler->name != iface->proto_handler->name))
return;
if (n_data) {
diff --git a/iprule.c b/iprule.c
index 4e3dd15..81bb77a 100644
--- a/iprule.c
+++ b/iprule.c
@@ -233,7 +233,7 @@ rule_cmp(const void *k1, const void *k2, void *ptr)
static void
iprule_update_rule(struct vlist_tree *tree,
- struct vlist_node *node_new, struct vlist_node *node_old)
+ struct vlist_node *node_new, struct vlist_node *node_old)
{
struct iprule *rule_old, *rule_new;
diff --git a/system-linux.c b/system-linux.c
index fcd1b2e..8a1173c 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -139,7 +139,7 @@ create_socket(int protocol, int groups)
static bool
create_raw_event_socket(struct event_socket *ev, int protocol, int groups,
- uloop_fd_handler cb, int flags)
+ uloop_fd_handler cb, int flags)
{
ev->sock = create_socket(protocol, groups);
if (!ev->sock)
@@ -243,7 +243,7 @@ int system_init(void)
return -1;
if (!create_raw_event_socket(&hotplug_event, NETLINK_KOBJECT_UEVENT, 1,
- handle_hotplug_event, 0))
+ handle_hotplug_event, 0))
return -1;
// Receive network link events form kernel
@@ -1176,10 +1176,10 @@ int system_vlandev_add(struct device *vlandev, struct device *dev, struct vlande
nlmsg_append(msg, &iim, sizeof(iim), 0);
nla_put_string(msg, IFLA_IFNAME, vlandev->ifname);
nla_put_u32(msg, IFLA_LINK, dev->ifindex);
-
+
if (!(linkinfo = nla_nest_start(msg, IFLA_LINKINFO)))
goto nla_put_failure;
-
+
nla_put_string(msg, IFLA_INFO_KIND, "vlan");
if (!(data = nla_nest_start(msg, IFLA_INFO_DATA)))
@@ -2231,7 +2231,7 @@ static int system_add_gre_tunnel(const char *name, const char *kind,
else
tos = 1;
}
- }
+ }
if ((cur = tb[TUNNEL_ATTR_INFO]) && (blobmsg_type(cur) == BLOBMSG_TYPE_STRING)) {
uint8_t icsum, ocsum, iseqno, oseqno;
@@ -2464,7 +2464,7 @@ static int system_add_proto_tunnel(const char *name, const uint8_t proto, const
struct blob_attr *cur;
bool set_df = true;
struct ip_tunnel_parm p = {
- .link = link,
+ .link = link,
.iph = {
.version = 4,
.ihl = 5,
diff --git a/system.h b/system.h
index e810ed9..9c40e4c 100644
--- a/system.h
+++ b/system.h
@@ -41,13 +41,13 @@ extern const struct uci_blob_param_list tunnel_attr_list;
enum bridge_opt {
/* stp and forward delay always set */
- BRIDGE_OPT_AGEING_TIME = (1 << 0),
- BRIDGE_OPT_HELLO_TIME = (1 << 1),
- BRIDGE_OPT_MAX_AGE = (1 << 2),
- BRIDGE_OPT_ROBUSTNESS = (1 << 3),
- BRIDGE_OPT_QUERY_INTERVAL = (1 << 4),
- BRIDGE_OPT_QUERY_RESPONSE_INTERVAL = (1 << 5),
- BRIDGE_OPT_LAST_MEMBER_INTERVAL = (1 << 6),
+ BRIDGE_OPT_AGEING_TIME = (1 << 0),
+ BRIDGE_OPT_HELLO_TIME = (1 << 1),
+ BRIDGE_OPT_MAX_AGE = (1 << 2),
+ BRIDGE_OPT_ROBUSTNESS = (1 << 3),
+ BRIDGE_OPT_QUERY_INTERVAL = (1 << 4),
+ BRIDGE_OPT_QUERY_RESPONSE_INTERVAL = (1 << 5),
+ BRIDGE_OPT_LAST_MEMBER_INTERVAL = (1 << 6),
};
struct bridge_config {
diff --git a/ubus.c b/ubus.c
index 0123b17..66f714a 100644
--- a/ubus.c
+++ b/ubus.c
@@ -402,8 +402,7 @@ netifd_add_interface_errors(struct blob_buf *b, struct interface *iface)
}
static void
-interface_ip_dump_address_list(struct interface_ip_settings *ip, bool v6,
- bool enabled)
+interface_ip_dump_address_list(struct interface_ip_settings *ip, bool v6, bool enabled)
{
struct device_addr *addr;
char *buf;
@@ -619,8 +618,7 @@ interface_ip_dump_prefix_assignment_list(struct interface *iface)
}
static void
-interface_ip_dump_dns_server_list(struct interface_ip_settings *ip,
- bool enabled)
+interface_ip_dump_dns_server_list(struct interface_ip_settings *ip, bool enabled)
{
struct dns_server *dns;
int buflen = 128;
@@ -637,8 +635,7 @@ interface_ip_dump_dns_server_list(struct interface_ip_settings *ip,
}
static void
-interface_ip_dump_dns_search_list(struct interface_ip_settings *ip,
- bool enabled)
+interface_ip_dump_dns_search_list(struct interface_ip_settings *ip, bool enabled)
{
struct dns_search_domain *dns;