Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Increment the source buffer when we overflow so tha...
details: https://anonhg.NetBSD.org/src/rev/c21328a873d1
branches: trunk
changeset: 771482:c21328a873d1
user: christos <christos%NetBSD.org@localhost>
date: Tue Nov 22 21:25:04 2011 +0000
description:
Increment the source buffer when we overflow so that we don't get stuck in
an infinite loop.
diffstat:
sys/kern/subr_prf.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r de0707be7194 -r c21328a873d1 sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c Tue Nov 22 21:24:51 2011 +0000
+++ b/sys/kern/subr_prf.c Tue Nov 22 21:25:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.145 2011/11/21 01:44:26 christos Exp $ */
+/* $NetBSD: subr_prf.c,v 1.146 2011/11/22 21:25:04 christos Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.145 2011/11/21 01:44:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.146 2011/11/22 21:25:04 christos Exp $");
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@@ -1144,6 +1144,8 @@
if (oflags == TOBUFONLY) { \
if ((vp == NULL) || (sbuf < tailp)) \
*sbuf++ = (C); \
+ else \
+ sbuf++; \
} else { \
putchar((C), oflags, vp); \
} \
Home |
Main Index |
Thread Index |
Old Index