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/dev | |
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/dev')
-rw-r--r-- | sys/dev/acpi_support/acpi_asus.c | 2 | ||||
-rw-r--r-- | sys/dev/led/led.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi_support/acpi_asus.c b/sys/dev/acpi_support/acpi_asus.c index 3730fe8..f6b33f4 100644 --- a/sys/dev/acpi_support/acpi_asus.c +++ b/sys/dev/acpi_support/acpi_asus.c @@ -565,7 +565,7 @@ acpi_asus_probe(device_t dev) } } - sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + sb = sbuf_new_auto(); if (sb == NULL) return (ENOMEM); diff --git a/sys/dev/led/led.c b/sys/dev/led/led.c index 73af18a..d086f4e 100644 --- a/sys/dev/led/led.c +++ b/sys/dev/led/led.c @@ -142,7 +142,7 @@ led_write(struct cdev *dev, struct uio *uio, int ioflag) return(error); } - sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + sb = sbuf_new_auto(); if (sb == NULL) { free(s2, M_DEVBUF); return (ENOMEM); |