diff options
| author | David Lamparter <equinox@diac24.net> | 2019-06-12 17:11:21 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2019-06-12 19:35:43 +0200 |
| commit | c7179009cf1713db55d48e6ab1275ac00be555ac (patch) | |
| tree | dfe1a531ec549f2d5b2585e4300a5bb8853d4a2b /lib/sbuf.c | |
| parent | 7e5cfaea0a6b2da853e5d78ee7f866c2cfc49154 (diff) | |
lib: use snprintfrr() in "hidden" printfs
We need to be calling snprintfrr() instead of snprintf() in places that
wrap snprintf in some user-exposed way; otherwise the extensions won't
be available for those functions.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/sbuf.c')
| -rw-r--r-- | lib/sbuf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sbuf.c b/lib/sbuf.c index 03a2be3e09..c04af153b1 100644 --- a/lib/sbuf.c +++ b/lib/sbuf.c @@ -22,6 +22,7 @@ */ #include <zebra.h> +#include "printfrr.h" #include "sbuf.h" #include "memory.h" @@ -68,7 +69,7 @@ void sbuf_push(struct sbuf *buf, int indent, const char *format, ...) written1 = indent; va_start(args, format); - written2 = vsnprintf(NULL, 0, format, args); + written2 = vsnprintfrr(NULL, 0, format, args); va_end(args); new_size = buf->size; @@ -92,8 +93,8 @@ void sbuf_push(struct sbuf *buf, int indent, const char *format, ...) buf->pos = buf->size; va_start(args, format); - written = vsnprintf(buf->buf + buf->pos, buf->size - buf->pos, format, - args); + written = vsnprintfrr(buf->buf + buf->pos, buf->size - buf->pos, + format, args); va_end(args); if (written >= 0) |
