aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_sbuf.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2001-06-11 18:36:18 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2001-06-11 18:36:18 +0000
commite3b373228cb83df4d4b76e5fab2e487e551a5545 (patch)
tree3dc9969b8d9f1f9691161e2f8f166a6b9a9f0fa1 /sys/kern/subr_sbuf.c
parentb95111df1258dcc948f95c51d28d3ed1a59fe9a4 (diff)
downloadsrc-e3b373228cb83df4d4b76e5fab2e487e551a5545.tar.gz
src-e3b373228cb83df4d4b76e5fab2e487e551a5545.zip
Notes
Diffstat (limited to 'sys/kern/subr_sbuf.c')
-rw-r--r--sys/kern/subr_sbuf.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c
index 0493aefb6e6b..ea05f8b16110 100644
--- a/sys/kern/subr_sbuf.c
+++ b/sys/kern/subr_sbuf.c
@@ -204,16 +204,8 @@ sbuf_bcopyin(struct sbuf *s, const void *uaddr, size_t len)
return (0);
if (len > (s->s_size - s->s_len - 1))
len = s->s_size - s->s_len - 1;
- switch (copyin(uaddr, s->s_buf + s->s_len, len)) {
- case ENAMETOOLONG:
- SBUF_SETFLAG(s, SBUF_OVERFLOWED);
- /* fall through */
- case 0:
- s->s_len += len;
- break;
- default:
- return (-1); /* XXX */
- }
+ if (copyin(uaddr, s->s_buf + s->s_len, len) != 0)
+ return (-1);
return (0);
}