summaryrefslogtreecommitdiff
path: root/sys/kern/subr_sbuf.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-01-24 20:57:56 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-01-24 20:57:56 +0000
commit9118ec5a27abbbfa10e77acf45ecca7d13352eb7 (patch)
tree6a5d37f0e4ad5ea64bbc40615bd6028058b17d1b /sys/kern/subr_sbuf.c
parent46d0cbc2cd60a19a23ea41ecbb2f403b9878f727 (diff)
downloadsrc-test2-9118ec5a27abbbfa10e77acf45ecca7d13352eb7.tar.gz
src-test2-9118ec5a27abbbfa10e77acf45ecca7d13352eb7.zip
Notes
Diffstat (limited to 'sys/kern/subr_sbuf.c')
-rw-r--r--sys/kern/subr_sbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c
index 96d50780e367..4553fcb41ff7 100644
--- a/sys/kern/subr_sbuf.c
+++ b/sys/kern/subr_sbuf.c
@@ -268,7 +268,7 @@ sbuf_bcat(struct sbuf *s, const char *str, size_t len)
if (SBUF_HASOVERFLOWED(s))
return (-1);
- while (len--) {
+ for (; len; len--) {
if (!SBUF_HASROOM(s) && sbuf_extend(s, len) < 0)
break;
s->s_buf[s->s_len++] = *str++;