summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2016-05-19 09:40:31 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2016-05-19 09:40:31 +0000
commitf68314f47c88b9d4232133eb59453979ae6fddf9 (patch)
tree7daac99cce13813540bdc9a35a01e9b1b9569815
parent7e98191582fa87e30178bc9cf81e06dc9eb4920a (diff)
All msg buf counters are long, so lmin(9) should be used for them.
OK deraadt@ natano@
-rw-r--r--sys/kern/subr_log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index 4f2b924a4e5..9455332d8b5 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_log.c,v 1.43 2016/05/18 23:42:12 bluhm Exp $ */
+/* $OpenBSD: subr_log.c,v 1.44 2016/05/19 09:40:30 bluhm Exp $ */
/* $NetBSD: subr_log.c,v 1.11 1996/03/30 22:24:44 christos Exp $ */
/*
@@ -145,7 +145,7 @@ msgbuf_putchar(struct msgbuf *mbp, const char c)
return;
mbp->msg_bufc[mbp->msg_bufx++] = c;
- mbp->msg_bufl = min(mbp->msg_bufl+1, mbp->msg_bufs);
+ mbp->msg_bufl = lmin(mbp->msg_bufl+1, mbp->msg_bufs);
if (mbp->msg_bufx < 0 || mbp->msg_bufx >= mbp->msg_bufs)
mbp->msg_bufx = 0;
/* If the buffer is full, keep the most recent data. */