diff options
author | des <des@FreeBSD.org> | 2008-08-09 11:14:05 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-08-09 11:14:05 +0000 |
commit | c2c1c946ae25855c779b03f9b612cfa2750a94aa (patch) | |
tree | a49f25cd0b20b9dc2d2e2f419d89d33aad927f68 /tools/regression | |
parent | 50ef01bba12b948cfb2dc282f8c080a15957acc6 (diff) | |
download | FreeBSD-src-c2c1c946ae25855c779b03f9b612cfa2750a94aa.zip FreeBSD-src-c2c1c946ae25855c779b03f9b612cfa2750a94aa.tar.gz |
Add sbuf_new_auto as a shortcut for the very common case of creating a
completely dynamic sbuf.
Obtained from: Varnish
MFC after: 2 weeks
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/geom/ConfCmp/ConfCmp.c | 4 | ||||
-rw-r--r-- | tools/regression/geom/MdLoad/MdLoad.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/regression/geom/ConfCmp/ConfCmp.c b/tools/regression/geom/ConfCmp/ConfCmp.c index 1ddf502..8c551cf 100644 --- a/tools/regression/geom/ConfCmp/ConfCmp.c +++ b/tools/regression/geom/ConfCmp/ConfCmp.c @@ -82,9 +82,9 @@ new_node(void) struct node *np; np = calloc(1, sizeof *np); - np->cont = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + np->cont = sbuf_new_auto(); sbuf_clear(np->cont); - np->key = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + np->key = sbuf_new_auto(); sbuf_clear(np->key); LIST_INIT(&np->children); return (np); diff --git a/tools/regression/geom/MdLoad/MdLoad.c b/tools/regression/geom/MdLoad/MdLoad.c index 710d7d3..33ee4de 100644 --- a/tools/regression/geom/MdLoad/MdLoad.c +++ b/tools/regression/geom/MdLoad/MdLoad.c @@ -208,7 +208,7 @@ g_simdisk_xml_load(const char *file) int fd, i; sc = calloc(1, sizeof *sc); - sc->sbuf = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + sc->sbuf = sbuf_new_auto(); LIST_INIT(&sc->sectors); XML_SetUserData(parser, sc); XML_SetElementHandler(parser, startElement, endElement); |