forked from Mirror/frr
*: use semicolon after printfrr_ext_autoreg_{p,d}
Mostly to make clang-format not format these to peak ugly. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
f59e688226
commit
54929fd38a
|
@ -237,7 +237,7 @@ struct bgp_node *bgp_table_subtree_lookup(const struct bgp_table *table,
|
|||
return matched;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("BD", printfrr_bd)
|
||||
printfrr_ext_autoreg_p("BD", printfrr_bd);
|
||||
static ssize_t printfrr_bd(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
|
|
@ -943,7 +943,7 @@ int nexthop_str2backups(const char *str, int *num_backups,
|
|||
* eth0
|
||||
* (0-length if no interface present)
|
||||
*/
|
||||
printfrr_ext_autoreg_p("NH", printfrr_nh)
|
||||
printfrr_ext_autoreg_p("NH", printfrr_nh);
|
||||
static ssize_t printfrr_nh(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
|
12
lib/prefix.c
12
lib/prefix.c
|
@ -1353,7 +1353,7 @@ char *evpn_es_df_alg2str(uint8_t df_alg, char *buf, int buf_len)
|
|||
return buf;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("EA", printfrr_ea)
|
||||
printfrr_ext_autoreg_p("EA", printfrr_ea);
|
||||
static ssize_t printfrr_ea(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -1368,7 +1368,7 @@ static ssize_t printfrr_ea(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return bputs(buf, cbuf);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("IA", printfrr_ia)
|
||||
printfrr_ext_autoreg_p("IA", printfrr_ia);
|
||||
static ssize_t printfrr_ia(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -1408,7 +1408,7 @@ static ssize_t printfrr_ia(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return bputs(buf, cbuf);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("I4", printfrr_i4)
|
||||
printfrr_ext_autoreg_p("I4", printfrr_i4);
|
||||
static ssize_t printfrr_i4(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -1431,7 +1431,7 @@ static ssize_t printfrr_i4(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return bputs(buf, cbuf);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("I6", printfrr_i6)
|
||||
printfrr_ext_autoreg_p("I6", printfrr_i6);
|
||||
static ssize_t printfrr_i6(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -1454,7 +1454,7 @@ static ssize_t printfrr_i6(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return bputs(buf, cbuf);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("FX", printfrr_pfx)
|
||||
printfrr_ext_autoreg_p("FX", printfrr_pfx);
|
||||
static ssize_t printfrr_pfx(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -1467,7 +1467,7 @@ static ssize_t printfrr_pfx(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return bputs(buf, cbuf);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("PSG4", printfrr_psg)
|
||||
printfrr_ext_autoreg_p("PSG4", printfrr_psg);
|
||||
static ssize_t printfrr_psg(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
|
|
@ -256,7 +256,7 @@ ssize_t printfrr_exti(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return -1;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("FB", printfrr_fb)
|
||||
printfrr_ext_autoreg_p("FB", printfrr_fb);
|
||||
static ssize_t printfrr_fb(struct fbuf *out, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ static ssize_t printfrr_fb(struct fbuf *out, struct printfrr_eargs *ea,
|
|||
return in->pos - in->buf;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("VA", printfrr_va)
|
||||
printfrr_ext_autoreg_p("VA", printfrr_va);
|
||||
static ssize_t printfrr_va(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
|
|
@ -209,10 +209,11 @@ void printfrr_ext_reg(const struct printfrr_ext *);
|
|||
.print_ptr = print_fn, \
|
||||
}; \
|
||||
static void _printreg_##print_fn(void) __attribute__((constructor)); \
|
||||
static void _printreg_##print_fn(void) { \
|
||||
static void _printreg_##print_fn(void) \
|
||||
{ \
|
||||
printfrr_ext_reg(&_printext_##print_fn); \
|
||||
} \
|
||||
/* end */
|
||||
MACRO_REQUIRE_SEMICOLON()
|
||||
|
||||
#define printfrr_ext_autoreg_i(matchs, print_fn) \
|
||||
static ssize_t print_fn(struct fbuf *, struct printfrr_eargs *, \
|
||||
|
@ -222,10 +223,11 @@ void printfrr_ext_reg(const struct printfrr_ext *);
|
|||
.print_int = print_fn, \
|
||||
}; \
|
||||
static void _printreg_##print_fn(void) __attribute__((constructor)); \
|
||||
static void _printreg_##print_fn(void) { \
|
||||
static void _printreg_##print_fn(void) \
|
||||
{ \
|
||||
printfrr_ext_reg(&_printext_##print_fn); \
|
||||
} \
|
||||
/* end */
|
||||
MACRO_REQUIRE_SEMICOLON()
|
||||
|
||||
/* fbuf helper functions - note all 3 of these return the length that would
|
||||
* be written regardless of how much space was available in the buffer, as
|
||||
|
|
|
@ -662,7 +662,7 @@ void sockunion_init(union sockunion *su)
|
|||
memset(su, 0, sizeof(union sockunion));
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("SU", printfrr_psu)
|
||||
printfrr_ext_autoreg_p("SU", printfrr_psu);
|
||||
static ssize_t printfrr_psu(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -752,7 +752,7 @@ int sockunion_is_null(const union sockunion *su)
|
|||
}
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_i("PF", printfrr_pf)
|
||||
printfrr_ext_autoreg_i("PF", printfrr_pf);
|
||||
static ssize_t printfrr_pf(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
uintmax_t val)
|
||||
{
|
||||
|
@ -775,7 +775,7 @@ static ssize_t printfrr_pf(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return bprintfrr(buf, "AF_(%ju)", val);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_i("SO", printfrr_so)
|
||||
printfrr_ext_autoreg_i("SO", printfrr_so);
|
||||
static ssize_t printfrr_so(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
uintmax_t val)
|
||||
{
|
||||
|
|
|
@ -306,7 +306,7 @@ const char *srcdest_rnode2str(const struct route_node *rn, char *str, int size)
|
|||
return srcdest2str(dst_p, (const struct prefix_ipv6 *)src_p, str, size);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("RN", printfrr_rn)
|
||||
printfrr_ext_autoreg_p("RN", printfrr_rn);
|
||||
static ssize_t printfrr_rn(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "printfrr.h"
|
||||
#include "monotime.h"
|
||||
|
||||
printfrr_ext_autoreg_p("HX", printfrr_hexdump)
|
||||
printfrr_ext_autoreg_p("HX", printfrr_hexdump);
|
||||
static ssize_t printfrr_hexdump(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ static ssize_t printfrr_hexdump(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
|
||||
/* string analog for hexdumps / the "this." in ("74 68 69 73 0a |this.|") */
|
||||
|
||||
printfrr_ext_autoreg_p("HS", printfrr_hexdstr)
|
||||
printfrr_ext_autoreg_p("HS", printfrr_hexdstr);
|
||||
static ssize_t printfrr_hexdstr(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ static ssize_t bquote(struct fbuf *buf, const uint8_t *pos, size_t len,
|
|||
return ret;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("SE", printfrr_escape)
|
||||
printfrr_ext_autoreg_p("SE", printfrr_escape);
|
||||
static ssize_t printfrr_escape(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *vptr)
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ static ssize_t printfrr_escape(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return bquote(buf, ptr, len, ESC_ALL);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("SQ", printfrr_quote)
|
||||
printfrr_ext_autoreg_p("SQ", printfrr_quote);
|
||||
static ssize_t printfrr_quote(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *vptr)
|
||||
{
|
||||
|
@ -555,7 +555,7 @@ static ssize_t printfrr_reltime(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return ret;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("TS", printfrr_ts)
|
||||
printfrr_ext_autoreg_p("TS", printfrr_ts);
|
||||
static ssize_t printfrr_ts(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *vptr)
|
||||
{
|
||||
|
@ -566,7 +566,7 @@ static ssize_t printfrr_ts(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return printfrr_time(buf, ea, ts, 0);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("TV", printfrr_tv)
|
||||
printfrr_ext_autoreg_p("TV", printfrr_tv);
|
||||
static ssize_t printfrr_tv(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *vptr)
|
||||
{
|
||||
|
@ -581,7 +581,7 @@ static ssize_t printfrr_tv(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return printfrr_time(buf, ea, &ts, 0);
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("TT", printfrr_tt)
|
||||
printfrr_ext_autoreg_p("TT", printfrr_tt);
|
||||
static ssize_t printfrr_tt(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *vptr)
|
||||
{
|
||||
|
|
|
@ -2099,7 +2099,7 @@ static ssize_t printfrr_thread_dbg(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
return rv;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("TH", printfrr_thread)
|
||||
printfrr_ext_autoreg_p("TH", printfrr_thread);
|
||||
static ssize_t printfrr_thread(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *ptr)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "prefix.h"
|
||||
|
||||
|
||||
printfrr_ext_autoreg_p("PA", printfrr_pimaddr)
|
||||
printfrr_ext_autoreg_p("PA", printfrr_pimaddr);
|
||||
static ssize_t printfrr_pimaddr(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *vptr)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ static ssize_t printfrr_pimaddr(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||
#endif
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("SG", printfrr_sgaddr)
|
||||
printfrr_ext_autoreg_p("SG", printfrr_sgaddr);
|
||||
static ssize_t printfrr_sgaddr(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
const void *vptr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue