From 44c12e87ecced87607e4a34b11c4aa2fc8c9a125 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Tue, 3 Jan 2023 15:59:11 +0100 Subject: [PATCH] gluon-mesh-batman-adv: fix c indentation --- .../src/respondd-neighbours.c | 6 ++--- .../src/respondd-nodeinfo.c | 4 ++-- .../src/respondd-statistics.c | 22 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package/gluon-mesh-batman-adv/src/respondd-neighbours.c b/package/gluon-mesh-batman-adv/src/respondd-neighbours.c index 344b8f69..5785e358 100644 --- a/package/gluon-mesh-batman-adv/src/respondd-neighbours.c +++ b/package/gluon-mesh-batman-adv/src/respondd-neighbours.c @@ -68,7 +68,7 @@ static int parse_orig_list_netlink_cb(struct nl_msg *msg, void *arg) char mac1[18]; opts = batadv_container_of(query_opts, struct neigh_netlink_opts, - query_opts); + query_opts); if (!genlmsg_valid_hdr(nlh, 0)) return NL_OK; @@ -79,11 +79,11 @@ static int parse_orig_list_netlink_cb(struct nl_msg *msg, void *arg) return NL_OK; if (nla_parse(attrs, BATADV_ATTR_MAX, genlmsg_attrdata(ghdr, 0), - genlmsg_len(ghdr), batadv_genl_policy)) + genlmsg_len(ghdr), batadv_genl_policy)) return NL_OK; if (batadv_genl_missing_attrs(attrs, parse_orig_list_mandatory, - BATADV_ARRAY_SIZE(parse_orig_list_mandatory))) + BATADV_ARRAY_SIZE(parse_orig_list_mandatory))) return NL_OK; orig = nla_data(attrs[BATADV_ATTR_ORIG_ADDRESS]); diff --git a/package/gluon-mesh-batman-adv/src/respondd-nodeinfo.c b/package/gluon-mesh-batman-adv/src/respondd-nodeinfo.c index 57ca8a19..8cef4e8b 100644 --- a/package/gluon-mesh-batman-adv/src/respondd-nodeinfo.c +++ b/package/gluon-mesh-batman-adv/src/respondd-nodeinfo.c @@ -106,7 +106,7 @@ static bool interface_file_exists(const char *ifname, const char *name) { } static void mesh_add_subif(const char *ifname, struct json_object *wireless, - struct json_object *tunnel, struct json_object *other) { + struct json_object *tunnel, struct json_object *other) { struct json_object *address = gluonutil_wrap_and_free_string(gluonutil_get_interface_address(ifname)); /* In case of VLAN and bridge interfaces, we want the lower interface @@ -144,7 +144,7 @@ static struct json_object * get_mesh_subifs(const char *ifname) { size_t i; for (i = 0; i < lower.gl_pathc; i++) { mesh_add_subif(lower.gl_pathv[i] + pattern_len - 1, - wireless, tunnel, other); + wireless, tunnel, other); } globfree(&lower); diff --git a/package/gluon-mesh-batman-adv/src/respondd-statistics.c b/package/gluon-mesh-batman-adv/src/respondd-statistics.c index cc4db719..28131fda 100644 --- a/package/gluon-mesh-batman-adv/src/respondd-statistics.c +++ b/package/gluon-mesh-batman-adv/src/respondd-statistics.c @@ -57,7 +57,7 @@ static int parse_gw_list_netlink_cb(struct nl_msg *msg, void *arg) char addr[18]; opts = batadv_container_of(query_opts, struct gw_netlink_opts, - query_opts); + query_opts); if (!genlmsg_valid_hdr(nlh, 0)) return NL_OK; @@ -68,11 +68,11 @@ static int parse_gw_list_netlink_cb(struct nl_msg *msg, void *arg) return NL_OK; if (nla_parse(attrs, BATADV_ATTR_MAX, genlmsg_attrdata(ghdr, 0), - genlmsg_len(ghdr), batadv_genl_policy)) + genlmsg_len(ghdr), batadv_genl_policy)) return NL_OK; if (batadv_genl_missing_attrs(attrs, gateways_mandatory, - BATADV_ARRAY_SIZE(gateways_mandatory))) + BATADV_ARRAY_SIZE(gateways_mandatory))) return NL_OK; if (!attrs[BATADV_ATTR_FLAG_BEST]) @@ -105,8 +105,8 @@ static void add_gateway(struct json_object *obj) { }; batadv_genl_query("bat0", BATADV_CMD_GET_GATEWAYS, - parse_gw_list_netlink_cb, NLM_F_DUMP, - &opts.query_opts); + parse_gw_list_netlink_cb, NLM_F_DUMP, + &opts.query_opts); } static inline bool ethtool_ioctl(int fd, struct ifreq *ifr, void *data) { @@ -214,7 +214,7 @@ static struct json_object * get_traffic(void) { json_object_object_add(ret, "mgmt_rx", mgmt_rx); json_object_object_add(ret, "mgmt_tx", mgmt_tx); - out: +out: free(stats); free(strings); close(fd); @@ -241,7 +241,7 @@ static int parse_clients_list_netlink_cb(struct nl_msg *msg, void *arg) uint32_t flags, lastseen; opts = batadv_container_of(query_opts, struct clients_netlink_opts, - query_opts); + query_opts); if (!genlmsg_valid_hdr(nlh, 0)) return NL_OK; @@ -252,11 +252,11 @@ static int parse_clients_list_netlink_cb(struct nl_msg *msg, void *arg) return NL_OK; if (nla_parse(attrs, BATADV_ATTR_MAX, genlmsg_attrdata(ghdr, 0), - genlmsg_len(ghdr), batadv_genl_policy)) + genlmsg_len(ghdr), batadv_genl_policy)) return NL_OK; if (batadv_genl_missing_attrs(attrs, clients_mandatory, - BATADV_ARRAY_SIZE(clients_mandatory))) + BATADV_ARRAY_SIZE(clients_mandatory))) return NL_OK; flags = nla_get_u32(attrs[BATADV_ATTR_TT_FLAGS]); @@ -282,8 +282,8 @@ static struct json_object * get_clients(void) { }; batadv_genl_query("bat0", BATADV_CMD_GET_TRANSTABLE_LOCAL, - parse_clients_list_netlink_cb, NLM_F_DUMP, - &opts.query_opts); + parse_clients_list_netlink_cb, NLM_F_DUMP, + &opts.query_opts); struct json_object *ret = json_object_new_object();