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 /sys/geom/geom_subr.c | |
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 'sys/geom/geom_subr.c')
-rw-r--r-- | sys/geom/geom_subr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 712ee50..b828ebc 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -324,7 +324,7 @@ g_new_geomf(struct g_class *mp, const char *fmt, ...) g_topology_assert(); G_VALID_CLASS(mp); - sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + sb = sbuf_new_auto(); va_start(ap, fmt); sbuf_vprintf(sb, fmt, ap); va_end(ap); @@ -566,7 +566,7 @@ g_new_providerf(struct g_geom *gp, const char *fmt, ...) KASSERT(!(gp->flags & G_GEOM_WITHER), ("new provider on WITHERing geom(%s) (class %s)", gp->name, gp->class->name)); - sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + sb = sbuf_new_auto(); va_start(ap, fmt); sbuf_vprintf(sb, fmt, ap); va_end(ap); |