summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2022-09-27 12:22:24 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2023-02-10 11:31:05 +0100
commit6c2cafdcb0341929b62e41c62919ca958ea0f6de (patch)
tree49bc97df8409ae71aaff7d3f27e3087b30b0d037
parent158332617d80fc24bad4e8590bcf19b4af19404e (diff)
lib: extend sbuf size
sbuf variable is used among other things to store IS-IS database output. Future commits will introduce the output of extended access groups in the "show isis database detail" output. Extend the sbuf size to have chance to store all information. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
-rw-r--r--lib/sbuf.c4
-rw-r--r--lib/sbuf.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/sbuf.c b/lib/sbuf.c
index c04af153b1..3f1b02eaf8 100644
--- a/lib/sbuf.c
+++ b/lib/sbuf.c
@@ -33,8 +33,8 @@ void sbuf_init(struct sbuf *dest, char *buf, size_t size)
dest->buf = buf;
dest->size = size;
} else {
- dest->buf = XMALLOC(MTYPE_TMP, 4096);
- dest->size = 4096;
+ dest->buf = XMALLOC(MTYPE_TMP, SBUF_DEFAULT_SIZE);
+ dest->size = SBUF_DEFAULT_SIZE;
}
dest->pos = 0;
diff --git a/lib/sbuf.h b/lib/sbuf.h
index aaa2db0edb..e5a43c0e37 100644
--- a/lib/sbuf.h
+++ b/lib/sbuf.h
@@ -64,6 +64,8 @@ extern "C" {
* the string returned in parser_log.
*/
+#define SBUF_DEFAULT_SIZE 8192
+
struct sbuf {
bool fixed;
char *buf;