Repository : ssh://git@diktynna/batctl On branches: main,main
commit c130e786ead2217c6da37c2a34d682d65bd5b502 Author: Sven Eckelmann sven@narfation.org Date: Sat Jan 4 09:31:35 2025 +0100
batctl: Fix misaligned start of lines
Signed-off-by: Sven Eckelmann sven@narfation.org
c130e786ead2217c6da37c2a34d682d65bd5b502 bisect_iv.c | 11 +++++------ debug.c | 4 ++-- list.h | 28 ++++++++++++++-------------- tcpdump.c | 4 ++-- 4 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/bisect_iv.c b/bisect_iv.c index 1cb11b8..6c7de24 100644 --- a/bisect_iv.c +++ b/bisect_iv.c @@ -977,9 +977,9 @@ static void seqno_trace_print_neigh(struct seqno_trace_neigh *seqno_trace_neigh,
printf("%s%s- %s [tq: %i, ttl: %i", head, (strlen(head) == 1 ? "" : num_sisters == 0 ? "\" : "|"), - get_name_by_macstr(seqno_trace_neigh->bat_node->name, read_opt), - seqno_trace_neigh->seqno_event->tq, - seqno_trace_neigh->seqno_event->ttl); + get_name_by_macstr(seqno_trace_neigh->bat_node->name, read_opt), + seqno_trace_neigh->seqno_event->tq, + seqno_trace_neigh->seqno_event->ttl);
printf(", neigh: %s", get_name_by_macstr(seqno_trace_neigh->seqno_event->neigh->name, read_opt)); @@ -995,8 +995,7 @@ static void seqno_trace_print_neigh(struct seqno_trace_neigh *seqno_trace_neigh, for (i = 0; i < seqno_trace_neigh->num_neighbors; i++) { snprintf(new_head, sizeof(new_head), "%s%s", (strlen(head) > 1 ? head : num_sisters == 0 ? " " : head), - (strlen(head) == 1 ? " " : - num_sisters == 0 ? " " : "| ")); + (strlen(head) == 1 ? " " : num_sisters == 0 ? " " : "| "));
seqno_trace_print_neigh(seqno_trace_neigh->seqno_trace_neigh[i], seqno_trace_neigh->seqno_event, @@ -1144,7 +1143,7 @@ static void seqno_trace_neigh_free(struct seqno_trace_neigh *seqno_trace_neigh)
static int seqno_trace_fix_leaf(struct seqno_trace_neigh *seqno_trace_mom, struct seqno_trace_neigh *seqno_trace_old_mom, - struct seqno_trace_neigh *seqno_trace_child) + struct seqno_trace_neigh *seqno_trace_child) { struct seqno_trace_neigh *seqno_trace_neigh; struct seqno_trace_neigh **data_ptr; diff --git a/debug.c b/debug.c index b715885..163a46b 100644 --- a/debug.c +++ b/debug.c @@ -71,7 +71,7 @@ int handle_debug_table(struct state *state, int argc, char **argv) if (!sscanf(optarg, "%f", &watch_interval)) { fprintf(stderr, "Error - provided argument of '-%c' is not a number\n", - optchar); + optchar); return EXIT_FAILURE; } break; @@ -86,7 +86,7 @@ int handle_debug_table(struct state *state, int argc, char **argv) if (!sscanf(optarg, "%f", &orig_timeout)) { fprintf(stderr, "Error - provided argument of '-%c' is not a number\n", - optchar); + optchar); return EXIT_FAILURE; } break; diff --git a/list.h b/list.h index af8805b..abcd08c 100644 --- a/list.h +++ b/list.h @@ -34,7 +34,7 @@ extern "C" { #ifndef container_of #ifdef LIST_TYPEOF_USE #define container_of(ptr, type, member) __extension__ ({ \ - const __typeof__(((type *)0)->member) * __pmember = (ptr); \ + const __typeof__(((type *)0)->member) *__pmember = (ptr); \ (type *)((char *)__pmember - offsetof(type, member)); }) #else #define container_of(ptr, type, member) \ @@ -98,7 +98,7 @@ static inline void INIT_LIST_HEAD(struct list_head *head) * @head: pointer to the head of the list */ static inline void list_add(struct list_head *node, - struct list_head *head) + struct list_head *head) { struct list_head *next = head->next;
@@ -114,7 +114,7 @@ static inline void list_add(struct list_head *node, * @head: pointer to the head of the list */ static inline void list_add_tail(struct list_head *node, - struct list_head *head) + struct list_head *head) { struct list_head *prev = head->prev;
@@ -220,7 +220,7 @@ static inline int list_is_singular(const struct list_head *head) * again. */ static inline void list_splice(struct list_head *list, - struct list_head *head) + struct list_head *head) { struct list_head *head_first = head->next; struct list_head *list_first = list->next; @@ -247,7 +247,7 @@ static inline void list_splice(struct list_head *list, * again. */ static inline void list_splice_tail(struct list_head *list, - struct list_head *head) + struct list_head *head) { struct list_head *head_last = head->prev; struct list_head *list_first = list->next; @@ -276,7 +276,7 @@ static inline void list_splice_tail(struct list_head *list, * list/unlinked state. */ static inline void list_splice_init(struct list_head *list, - struct list_head *head) + struct list_head *head) { list_splice(list, head); INIT_LIST_HEAD(list); @@ -295,7 +295,7 @@ static inline void list_splice_init(struct list_head *list, * list/unlinked state. */ static inline void list_splice_tail_init(struct list_head *list, - struct list_head *head) + struct list_head *head) { list_splice_tail(list, head); INIT_LIST_HEAD(list); @@ -314,8 +314,8 @@ static inline void list_splice_tail_init(struct list_head *list, * list node from @head_from or the behavior is undefined. */ static inline void list_cut_position(struct list_head *head_to, - struct list_head *head_from, - struct list_head *node) + struct list_head *head_from, + struct list_head *node) { struct list_head *head_from_first = head_from->next;
@@ -358,7 +358,7 @@ static inline void list_move(struct list_head *node, struct list_head *head) * The @node is removed from its old position/node and add to the end of @head */ static inline void list_move_tail(struct list_head *node, - struct list_head *head) + struct list_head *head) { list_del(node); list_add_tail(node, head); @@ -568,7 +568,7 @@ static inline void INIT_HLIST_NODE(struct hlist_node *node) * @head: pointer to the head of the hlist */ static inline void hlist_add_head(struct hlist_node *node, - struct hlist_head *head) + struct hlist_head *head) { struct hlist_node *first = head->first;
@@ -585,7 +585,7 @@ static inline void hlist_add_head(struct hlist_node *node, * @node: pointer to the reference node in the hlist */ static inline void hlist_add_before(struct hlist_node *new_node, - struct hlist_node *node) + struct hlist_node *node) { struct hlist_node **pprev = node->pprev;
@@ -601,7 +601,7 @@ static inline void hlist_add_before(struct hlist_node *new_node, * @node: pointer to the reference node in the hlist */ static inline void hlist_add_behind(struct hlist_node *new_node, - struct hlist_node *node) + struct hlist_node *node) { struct hlist_node *next = node->next;
@@ -682,7 +682,7 @@ static inline int hlist_empty(const struct hlist_head *head) * is initialized again to an empty hlist. */ static inline void hlist_move_list(struct hlist_head *list, - struct hlist_head *head) + struct hlist_head *head) { head->first = list->first; if (head->first) diff --git a/tcpdump.c b/tcpdump.c index d4e805d..32f9a04 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -566,8 +566,8 @@ static void dump_udp(const char ip_string[], unsigned char *packet_buff, sizeof(struct udphdr), (size_t)44, "DHCP"); printf("%s.67: BOOTP/DHCP, Request from %s, length %zu\n", dst_addr, - ether_ntoa_long((struct ether_addr *)(((char *)udphdr) + - sizeof(struct udphdr) + 28)), + ether_ntoa_long((struct ether_addr *) + (((char *)udphdr) + sizeof(struct udphdr) + 28)), (size_t)buff_len - ip6_header_len - sizeof(struct udphdr)); break;