summaryrefslogtreecommitdiff
path: root/lib/printf/glue.c
AgeCommit message (Collapse)Author
2023-05-22lib: va_end must be calledDonald Sharp
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>
2023-02-09*: manual SPDX License ID conversionsDavid Lamparter
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>
2023-01-27*: no-warn pragmas for non-const format stringsDavid Lamparter
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>
2022-01-14*: use semicolon after printfrr_ext_autoreg_{p,d}David Lamparter
Mostly to make clang-format not format these to peak ugly. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-03-30lib: add `%pFB` extension to print struct fbuf *David Lamparter
Useful to insert output from another bprintfrr() call. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-30lib: add `%pVA` recursive printfrrDavid Lamparter
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>
2021-03-30lib: put printfrr extension args into structDavid Lamparter
... for easier extensibility. Add width, # and - flags while at it. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-27lib: rework printfrr extensions to output directlyDavid Lamparter
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>
2019-10-25lib: va_copy must have a va_end to free memoryDonald Sharp
All va_copy() calls must have a va_end() call. Caught by Coverity Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-03lib/printf: add extension supportDavid Lamparter
Inspired by the Linux kernel, this allows us to do %pI4 and similar things. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-03lib/printf: integrateDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>