summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-28 01:05:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-28 01:05:49 +0000
commit0f2e018e03bf5280bba290a64455910081c8d3f7 (patch)
tree6e31d7fb8b7afb8bf424855a9210fabfa3723744 /sys
parent875b571fe1880c3b8b8aa8db51106e1430af4eb0 (diff)
fix vsnprintf return val
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_prf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index c6d49dfeda6..c38fad6e73f 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_prf.c,v 1.9 1996/07/23 23:54:19 deraadt Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.10 1996/07/28 01:05:48 deraadt Exp $ */
/* $NetBSD: subr_prf.c,v 1.25 1996/04/22 01:38:46 christos Exp $ */
/*-
@@ -565,9 +565,9 @@ reswitch: switch (ch = *(u_char *)fmt++) {
case '\0':
while(*--fmt != '%')
;
- while(*bp++ = *fmt++)
+ while((*bp++ = *fmt++))
;
- return;
+ return ((bp - buf) - 1);
case '0':
padc = '0';
goto reswitch;