Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libutil Fix boundary condition in multi-line form...
details: https://anonhg.NetBSD.org/src/rev/629a9eb4f672
branches: trunk
changeset: 789129:629a9eb4f672
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed Aug 07 22:37:28 2013 +0000
description:
Fix boundary condition in multi-line format. When the '=' following a
field name exactly filled a line, the back-up logic failed and really
messed up the formatting!
diffstat:
common/lib/libutil/snprintb.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r bc3bf4876665 -r 629a9eb4f672 common/lib/libutil/snprintb.c
--- a/common/lib/libutil/snprintb.c Wed Aug 07 22:09:30 2013 +0000
+++ b/common/lib/libutil/snprintb.c Wed Aug 07 22:37:28 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: snprintb.c,v 1.9 2013/08/06 22:02:50 apb Exp $ */
+/* $NetBSD: snprintb.c,v 1.10 2013/08/07 22:37:28 pgoyette Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
# include <sys/cdefs.h>
# if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: snprintb.c,v 1.9 2013/08/06 22:02:50 apb Exp $");
+__RCSID("$NetBSD: snprintb.c,v 1.10 2013/08/07 22:37:28 pgoyette Exp $");
# endif
# include <sys/types.h>
@@ -51,7 +51,7 @@
# include <errno.h>
# else /* ! _KERNEL */
# include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.9 2013/08/06 22:02:50 apb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.10 2013/08/07 22:37:28 pgoyette Exp $");
# include <sys/param.h>
# include <sys/inttypes.h>
# include <sys/systm.h>
@@ -215,10 +215,10 @@
sep = ',';
if (ch == 'F') /* just extract */
break;
- if (restart == 0) {
+ if (restart == 0)
PUTS(bitfmt);
+ if (restart == 0)
PUTCHR('=');
- }
if (restart == 0) {
f_len = snprintf(bp, buflen - t_len,
sbase, field);
Home |
Main Index |
Thread Index |
Old Index