summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1997-12-28 23:39:28 +0000
committerniklas <niklas@openbsd.org>1997-12-28 23:39:28 +0000
commitb1e9aafe7998ec711d847b4c01caeb82b8d9f794 (patch)
treee5e3662eff8d2548758409fcba1872f3e1ade487 /sys/kern/subr_prf.c
parentbe more careful during termination (diff)
downloadwireguard-openbsd-b1e9aafe7998ec711d847b4c01caeb82b8d9f794.tar.xz
wireguard-openbsd-b1e9aafe7998ec711d847b4c01caeb82b8d9f794.zip
Do not lose the first char in msgbuf
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c9
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);