| Age | Commit message (Collapse) | Author |
|
According to the man page a va_start must be followed by
a va_end before the end of the function.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
The files converted in this commit either had some random misspelling or
formatting weirdness that made them escape automated replacement, or
have a particularly "weird" licensing setup (e.g. dual-licensed.)
This also marks a bunch of "public domain" files as SPDX License "NONE".
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
We do use non-constant/literal format strings in a few places for more
or less valid reasons; put `ignored "-Wformat-nonliteral"` around those
so we can have the warning enabled for everywhere else.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Mostly to make clang-format not format these to peak ugly.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Useful to insert output from another bprintfrr() call.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Analogous to Linux kernel `%pV` (but our mechanism expects 2 specifier
chars and `%pVA` is clearer anyway.)
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
... for easier extensibility. Add width, # and - flags while at it.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Allowing printfrr extensions to directly write to the output buffer has
a few advantages:
- there is no arbitrary length limit imposed (previously 64)
- the output doesn't need to be copied another time
- the extension can directly use bprintfrr() to put together pieces
The downside is that the theoretical length (regardless of available
buffer space) must be computed correctly.
Extended unit tests to test these paths a bit more thoroughly.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
All va_copy() calls must have a va_end() call.
Caught by Coverity
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
Inspired by the Linux kernel, this allows us to do %pI4 and similar
things.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Signed-off-by: David Lamparter <equinox@diac24.net>
|