From f68314f47c88b9d4232133eb59453979ae6fddf9 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Thu, 19 May 2016 09:40:31 +0000 Subject: All msg buf counters are long, so lmin(9) should be used for them. OK deraadt@ natano@ --- sys/kern/subr_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') 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. */ -- cgit v1.2.3