diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-12-28 23:39:29 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-12-28 23:39:29 +0000 |
commit | 31f5ebdd286ec7123f0ef7f7e6a92256da754418 (patch) | |
tree | a9e1bd0031c709f0a15928e6e0fa5a8f4e376922 /sys/kern/subr_prf.c | |
parent | 93935da12c8e673546f249f31f05ddf65963b74f (diff) |
Do not lose the first char in msgbuf
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index d357a37ad41..50296436ab5 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_prf.c,v 1.17 1997/11/04 20:43:26 chuck Exp $ */ +/* $OpenBSD: subr_prf.c,v 1.18 1997/12/28 23:39:28 niklas Exp $ */ /* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */ /*- @@ -310,11 +310,10 @@ putchar(c, flags, tp) if (mbp->msg_magic != MSG_MAGIC) { bzero((caddr_t) mbp, sizeof(*mbp)); mbp->msg_magic = MSG_MAGIC; - } else { - mbp->msg_bufc[mbp->msg_bufx++] = c; - if (mbp->msg_bufx < 0 || mbp->msg_bufx >= MSG_BSIZE) - mbp->msg_bufx = 0; } + mbp->msg_bufc[mbp->msg_bufx++] = c; + if (mbp->msg_bufx < 0 || mbp->msg_bufx >= MSG_BSIZE) + mbp->msg_bufx = 0; } if ((flags & TOCONS) && constty == NULL && c != '\0') (*v_putc)(c); |